Questions tagged [glsl]
GLSL is the OpenGL shading language. Use this tag for questions which are specifically about shaders written in this language. For generic shader questions use [shader] instead.
267 questions
1
vote
0
answers
63
views
Mesh shrinks during animation
I extracted vertex data: positions, indices, weights and bone indices, as well as animation data: inverse-bind matrices, sampler inputs and outputs, etc, from SimpleSkin.gltf
I followed the tutorial ...
1
vote
1
answer
95
views
Spir-V compile glsl shader with includes
I have some SSBOs that are used in several shaders. So I want to save their definition and their call functions in a separate text file and include them into the shaders. This is really necessary ...
0
votes
0
answers
99
views
Using SSBO as atomic stack or queue
I have two ssbo buffers:
the data SSBO: It is an array of a structure that contains information.
the delete SSBO: It is a list of free indices within the data SSBO.
Each compute shader invocation ...
0
votes
0
answers
73
views
webGL Shadows implementation (FrameBuffer)
I wanna implement shadows example from webgl2fundamentals
also i a aware of framebuffer principe a have already working implementation of mirror projection.
Ignore VS extra vars .
I have trouble with ...
0
votes
0
answers
81
views
Shadow mapping issue using textureProj
I am trying to do shadow mapping in vulkan however, the result I am getting is not correct. For shadow mapping we can use a sampler2DShadow and textureProj which is what I am doing but the result ...
0
votes
0
answers
39
views
SSR not reflecting when rendering
I am trying to implement SSR using DDA but the output result seems to not product any reflections or reflect the scene. I feel the code is correct from my knowledge of graphics at the moment and ...
0
votes
0
answers
118
views
How do you interrupt from a compute shader?
I am trying to solve a problem with compute shaders.
I have several shaders that are executed one after the other in a loop.
At an unpredictable time, the memory is full and the shaders should be ...
3
votes
1
answer
851
views
What's the difference of using smoothstep and linear interpolation for antialiasing?
I am currently writing a fragment shader where I want to draw an antialiased line. My first instinct was to calculate the color of each pixel based on the distance to the line. Something like: (using ...
0
votes
0
answers
90
views
Conversion of the Cubemap direction access vector to UV coordinates
In GLSL, cubemaps within a shader can be read with
gvec4 texture(gsamplerCube sampler,
vec3 P,
[float bias]);
so a direction is used. How can the direction ...
1
vote
2
answers
105
views
Confusion about camera ray pdf
When I was studying a code base of path tracing implementation (done in GLSL), I notice the author returned a pdf of generated camera ray:
...
0
votes
0
answers
54
views
HealPix: Different results when comparing C++ and Vulkan
I have converted the algorithm for calculating the HealPix value from Lat/Lon values from C++ to GLSL. The result is saved in a BMP image and looks correct. Both algorithms (C++ and GLSL) use the same ...
1
vote
0
answers
195
views
Projecting a texture onto UVs with GLSL
I am trying to project an image overlayed on top of a mesh in screen space back to it's uvs. The UV triangles do not always cover entire pixels so i get this. The red is showing where the texture is ...
0
votes
1
answer
623
views
Preferred GPU API to use for Steam Deck, Windows, Linux and MacOS support
Good people of the graphics SO community, I am new to Graphics programming or GPU programming in general but I have been a game dev enthusiast for over 4-5 years. I started learning about Graphics ...
0
votes
1
answer
128
views
Slice a volume in GLSL using raymarching
I'm currently visualizing scientific data as volumes using Three and GLSL. I have a raymarching script that is pretty standard and colors based on a colormap I feed into the shader.
It looks like this
...
1
vote
0
answers
88
views
How can you tessellate degenerate triangles evenly?
If you use the tessellation shader for triangle patches, you can only set the following four values to define the tessellation structure of the triangle:
...