Tagged Questions
a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered
0
votes
0answers
10 views
Circular lighting mask stretches to ellipse in Monogame using Pixel Shader
I am trying to implement a very simple pixel shader for some basic lighting using this tutorial http://www.xnahub.com/simple-2d-lighting-system-in-c-and-monogame/
My problem is that when the effect ...
0
votes
0answers
48 views
GLSL - skewed parallax occlusion mapping
I'm currently trying to implement Parallax Occlusion Mapping, based off a post on sunandblackcat.com
With my current implementation, I have the following:
i.stack.imgur.com/H0c2s.png
Notice how the ...
0
votes
0answers
29 views
+50
Unity unlit terrain shader
I've been trying to create an unlit unity terrain shader but with no success, I downloaded the unity diffuse terrain shader :
Shader "Nature/Terrain/Diffuse" {
Properties {
[HideInInspector] ...
0
votes
1answer
66 views
Why is fog in games exponential and has a start distance?
In most tutorials I see on how to achieve fog with shaders the fog is exponential and has a minimum / start distance from the camera. Why? Both seem counterintuitive, especially the minimum distance. ...
1
vote
0answers
18 views
Line stipple with OpenGL ES 2.0
I found many threads about line stipple (dashed or dotted lines) with OpenGL ES2.0, but there are never any code examples or tutorials on how to implement it.
How do I implement line stipple in ...
0
votes
0answers
12 views
xBR filter in Monogame
I'm attempting to use the xBR upscaling filter in MonoGame. I have converted the this answer from XNA to Monogame.
This involved the following changes in the game:
// Original:
this.xbrEffect....
0
votes
1answer
16 views
Unity Vertex shader recalculate renderer bounds
I've made a simple billboard gpu instancing vertex shader that manipulates the verticies of an object based on the projection matrix. The problem is that the renderer bounds does not update to ...
1
vote
0answers
13 views
Unity: Can objects override shader/material properties?
I have a situation in unity where I have a custom shader with some properties where every object that uses this shader will want different values for those properties.
As far as I can tell, that ...
3
votes
2answers
70 views
What's the difference between CUDA and Shader?
I am new to CUDA, and it seems that CUDA and Shader are both GPU programs.
When we talk about GPU programming in rendering, like GPU voxelization, are we talking about CUDA or just converting data to ...
1
vote
1answer
17 views
SharpDX Texture to Image in C#
I currently have an image processing application that outputs processed images post pixel shaders have been applied. However, using the examples I've found on the internet, the colors are flip to BGRA ...
0
votes
1answer
25 views
Off screen image Direct3D processing with SharpDX, pixel shader and C#
I currently have a working app that can process images with a window handle. This of course makes use of the swap chain and so on... I need to process an image with pixel shader off screen without a ...
0
votes
0answers
37 views
Texture Splatter/Blend with Marching Cubes
[Question version 1.1 (deleted): now question version 2.0]
Thanks to DMGregory, I got my shader almost finished, because I'm only using two UV values now.
My situation is this now (the problem is at ...
0
votes
0answers
33 views
How to use Graphics.DrawProcedural to render a quad over a scene?
I want to learn this so I could do some screen space particles in Unity. This is meant as a sort of "hello world" shader.
my current script is:
using System.Collections;
using System.Collections....
0
votes
1answer
44 views
Fragment processing depends on polygon size?
I just set up some simple vertex/fragment shaders for handling lighting instead of using the openGL calls. I have a few terrain VBOs setup that are drawing a million or so triangles for testing (bunch ...
0
votes
1answer
50 views
Render Engine Only Renders one Frame? [DirectX/C#]
Just for background, I'm designing a soft engine in C# using the SharpDX DirectX wrapper library. I've gotten around to implementing the render engine, and I can render a texture to a face, except it ...
0
votes
0answers
32 views
Outlining edges
I want to create outlines for the edges of objects, which should look like this:
I tried using Unity's toon outline shader, however, it only displays the outer edges:
Is there a way to make it ...
6
votes
1answer
96 views
Animated textures for models; How to write a shader?
Was watching some Rocket League and notice there was animated decals and wheels.
.
I would like to implement something similar to the effects in the image above.
How would I go about writing a ...
0
votes
0answers
32 views
OpenGL Vertex shader matrix multiplication causes triangle to disappear
So i have a very basic functioning application, rendering a basic triangle (using vertex and fragment shaders)
When I try to multiply the in-vector in the vertex shader with a mat4 the triangle ...
0
votes
0answers
22 views
Monogame draw organization and shaders with Artemis
I've been using the C# port of the Artemis ECS in the Monogame 3.5 framework to develop a little engine for a 2D project. However I'm having a bit of an issue organizing how drawing systems are going ...
0
votes
0answers
27 views
Overlap transparent particles without blending? (Unity)
I'm trying to create a continuous output of light from an object (like the exhaust of a space ship), and I thought I'd use particles to achieve this. But I'm running into a problem with alpha blending....
1
vote
0answers
30 views
Shaderlab and Cg API reference [closed]
I am looking for definitive information on Shaderlab's API and the Cg language. The documentation I have found so far has been by way of example programs rather than a definition of APIs. Also, ...
1
vote
1answer
65 views
How to manage different shaders dynamically?
Currently I have only a really basic shader and a shader class.
My question is that if I want to make different shaders (with different uniforms, inputs, etc) how should the architecture look like?
...
0
votes
1answer
43 views
Simple LWJGL program renders nothing
When I run the following basic LWJGL program, all I get is a red screen due to glClearColor(1, 0, 0, 1). Nothing renders in the screen except the red background. I'm using Ubuntu as my operating ...
0
votes
1answer
44 views
How to draw connecting lines in plain color? [duplicate]
Since there is no option for flat shading in OpenGL ES2, is there a workaround to disable the color interpolation when different color is being passed to each of the vertices?
Update:
I'm working ...
0
votes
1answer
30 views
OpenGL geometry shader 2d rectangle extrusion has weird angles
I have a geometry shader that extrudes lines to rectangles in 2d (by outputting triangle strips). When the lines are not parallel to the X or Y axis, I'm getting parallelograms instead. Also, when the ...
0
votes
0answers
32 views
Fade or Cutout Render Mode, least performance expensive?
I would like to optimize my WebGL Unity game, so I was wondering if I have a plane with a texture of say a mountain for background, what render mode for its material be least expensive? Fade or Cutout?...
0
votes
1answer
38 views
How to change fov in vs shader?
is it possible to change the fov the vs shader? I zoom my camera by changing the fov value. However this will cause the skybox also be zoomed and this is not what I wanted. Is it possible to change ...
0
votes
0answers
33 views
Frustrum culling and Gpu instancing. Unity
I've been messing around with GPU instancing latley to see how it can improve the preformance of my game. When I have multiple objects on the screen with a shader that makes use of instancing the "...
0
votes
0answers
67 views
Shader that can detect intersection
I am a beginner shader worlds, it is much difficult to learn(anyhow i try sometime).I am searching a shader that can sense collision/intersection with other objects so that i can stop its rendering at ...
0
votes
0answers
11 views
How to change generated mask by texture mask?
I have a shader which generates opacity mask and rotate it.
This is how it looks:
Generated mask looks like this:
I generate a mask via code, but I want to take mask just from a texture2D.
How can ...
1
vote
1answer
95 views
creating a simple cartoon like light effect
I could like to create a really simple light engine that does not eat to much CPU and will produce this effect:
I am using libgdx for my game with box 2D light (which is too heavy for my needs). I ...
0
votes
1answer
47 views
OpenGLES texture coordinates in shader
Currently I'm doing an android 2D game using OpenGLES 2.0 and I noticed that my UVs never change in all of textures when rendering, like this in Java code:
public static FloatBuffer vertexUv;
...
0
votes
0answers
33 views
How to render my Texture with alpha instead of making alpha black (Custom shader)
Facebook just released some VR resources , I tried them and they work like intended, you see your Image, which is bent around your head (Helpful for prototyping and stuff...). Now I would like to edit ...
1
vote
1answer
50 views
DirectX shader - how to spread raytracer computation over multiple frames?
I'm playing around making a shadertoy style SDF raytracer in HLSL and to make it run faster on high resolutions (1080p and up) I'd like to spread the computation over multiple frames.
Right now I ...
0
votes
0answers
30 views
Particle shaders not visible when multiple cameras are used
I use a worldspace canvas in some parts of my game. I need the canvas to be visible, even if behind other objects. To do this I've set up a 2nd camera parented to the main camera, set it's clear flags ...
0
votes
0answers
41 views
Blend background and sky smoothly
I have a game that shows as below when the user has not zoomed out:
Hover after zooming out, panning the screen this is how it looks.
I have three background layers.
How can I make the ...
3
votes
1answer
89 views
Opengl mutiple texture in a shader
Im using modern opengl and c++.
How do I draw a number of triangles each one having a different texture in one draw call when I only have 32 texture units on my graphics card and the max texture size ...
3
votes
1answer
103 views
What technique should I use in a shader to give this reflective effect?
I'm working on a top-down 2D strategy game written in Java with LibGDX (though really for the purposes of this question I'll be using GLSL).
I want to give metallic materials in the game a shiny ...
0
votes
0answers
39 views
Graphic Engine: shader architecture
I'm developing an OpenGL (3.0) Graphic Engine but I stuck while I was making shader API. Have I to make a static shader program implemented into the engine or should I let users make their shader ...
1
vote
1answer
72 views
Shader or No Shader?
I have a question about something I don't really understand.
In OpenTK, should I have shaders? Is it frowned upon not to? What are the pros and cons of having shaders?
Can I go perfectly fine without ...
0
votes
1answer
85 views
Is wireframe effect possible without geometry shader?
I am trying to write a shader that highlight the edge between each pair of vertices, much like the UCLA Wireframe Shader.
All implementations I came across require geometry shader support. I am ...
0
votes
0answers
29 views
Use FFP and shaders with RTShader system
I'm using some materials that need translation of RTSS and some that has their own shaders.
Does RTShader system know to handle both FFP and shaders at the same time?
0
votes
1answer
23 views
Prefab won't change to custom shader
I am writing here as I have encountered a problem with Unity. I have written my own surface shader and want to use it for a prefab. However, when I drag and drop the shader to the prefab in the editor,...
0
votes
1answer
52 views
Vertex shader with extrusion, what am I doing wrong?
So for a simple surface shader, you can use vertex modifier:
void vert (inout appdata_full v) {
v.vertex.xyz += v.normal * _Amount;
}
I was thinking the same would work as vertex ...
7
votes
0answers
193 views
Shader to see silhouette through alpha blended sprites
I want to achieve in Unity a see through effect like the one in these examples:
In my specific scenario there are a couple of requirements:
Sprites are using alpha blending, and sprites have ...
0
votes
1answer
18 views
Fragment shader coordinates: Displacing pixels and texCoord problems
I'm trying to create a shader that creates a displacement on an object, slicing horizontally the sprite.
These is an example of the atlas I'm using and the effect I'm trying to achieve:
I tried to ...
0
votes
0answers
32 views
Shadow Mapping Distortions only on large polygon surfaces
SOLVED See bottom :)
Hi Ive got a GLSL Shader question
Ive been teaching basic programming to some young students. Basic and some C++.
Ive setup a shader in a modern compiled basic to show what can ...
0
votes
0answers
36 views
Shaders in Unity: Exposing Texture Offset and mapping UV to terrain
Copying from https://forum.unity3d.com/threads/exposing-texture-offset-and-mapping-uv-to-terrain.441128/
Hi all,
I'm a bit of a shader noob and have been struggling for a bit with exposing the ...
1
vote
1answer
28 views
alpha test shader 'discard' operation not working - GLES2
I wrote this shader to illustare alpha test action in GLES2 (Galaxy S6).
I think is not working at all cause I don't see any change with or without it.
Is there anything Im missing?
Any syntax error?
...
0
votes
0answers
29 views
FFP Alpha Test shader - function decleration
I'm trying to use FFP_Alpha_Test RTSS from ogre on GLES2 platform.
I added the relevant files and built everything but got an error:
No matching function for call to 'FFP_Alpha_Test'
Fragment Program ...