All Questions
41 questions
0
votes
1
answer
144
views
GLSL ported shader not working in HLSL
I have been working on an Infinity Grid shader for my engine.
It was already implemented to Vulkan’s GLSL, so it worked great with OpenGL’s (4.6) GLSL.
Here's a reference.
This basic shader with ...
1
vote
1
answer
510
views
Why does my stencil buffer allow pixels through?
I'm rendering a scene using OpenGL. The scene consists of a grassy environment and a small lake (visible as two surfaces). To achieve water surface transparency, I'm using a stencil buffer to render ...
2
votes
1
answer
1k
views
Is linear filtering possible on depth textures in OpenGL?
I'm working on shadow maps in OpenGL (using C#).
First, I've created a framebuffer and attached a depth texture as follows:
...
0
votes
1
answer
126
views
How should shader be structured? (GLSL)
I've been writing, deleting and rewriting OpenGL programs in C++ but usage of shaders confuse me. I don't know how it should be structured.
Scenario A:
(In a world we have a sun, the sun should ...
0
votes
2
answers
3k
views
How to decorate the floor with a grid?
I got this photo from mixamo.com — I want to draw grid lines similar to this on my floor.
I'm sure this is easy by using textures, but I'm trying to avoid using textures as much as possible. Is there ...
1
vote
1
answer
454
views
OpenGL Lines between triangles?
I'm currently using marching cubes to generate a mesh, and have encountered this incredibly weird problem.
Looking from below the terrain, these weird fully lit lines appear between every triangle. ...
1
vote
0
answers
238
views
Artefacts in SSAO Shader
I am having trouble with my Screen Space Ambient Occlusion shader.
The objects in the game have the correct occlusion applied to them, however the occlusion flips depending on the angle of the camera:...
0
votes
1
answer
1k
views
GLSL - Efficient Point inside Box Check
I'm attempting to improve the performance of a shader that changes the colour of a region of the world that is inside a "zone".
I am using a deferred lighting system, so the colour and world-space ...
1
vote
0
answers
455
views
Draw line around mesh with defined width at cut plane
I want to display a solid line around mesh with a defined width at a cut plane. Currently I realized that using the same method as gl_ClipDistance works using ...
1
vote
1
answer
110
views
GLSL Fragment Shader compiles fine on certain computers [closed]
I got this piece of code in a fragment shader:
if (color.a < 0.01f)
discard;
It runs fine on an older graphic card but can't even compile on my newer (...
3
votes
0
answers
170
views
What am I doing wrong, in regards to multi-texture?
I am writing a bump mapping demo, so I need an image texture, and a normal texture which should be loaded into the fragment shader.
This is the texture part of my OpenGL code:
...
0
votes
1
answer
179
views
Fragment Shader Code returns weird values
i've implemented a shader that produces a simple Radar Ping given a uniform time input. ShaderToy Proof of concept
Now i implemented this into my real Opengl GLFW GLAD C++ Core4.5Profile NVIDIA ...
2
votes
1
answer
2k
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:
...
0
votes
1
answer
221
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 ...
4
votes
1
answer
1k
views
Procedural Hatching
I know that it is possible to make a shader that uses procedural hatching instead of pre-designed tonal art maps. But is it possible to make that procedural hatching in the fragment shader? I would ...