2 votes

Preferred GPU API to use for Steam Deck, Windows, Linux and MacOS support

The choice of which API to use is less important then the concepts and methods that the API's are designed to implement. Once you understand the basic graphics concepts and how to implement them using ...
pmw1234's user avatar
  • 3,219
2 votes

Slice a volume in GLSL using raymarching

I was over thinking it. Instead of discarding it, I needed to just let the ray keep marching. adding ...
TheJeran's user avatar
  • 121
2 votes
Accepted

Geometry Shader Not Working

So as @Thomas mentioned, the issue seems to be the fact that I was passing "GL_LINE_STRIP" instead of "GL_LINE_STRIP_ADJACENCY" to the glDrawArrays() call. Apparently, "...
TFamIdoing's user avatar
2 votes

What's the type of iChannel[0-3] in Shadertoy?

You can click 'Shader inputs' above the panel containing the code to obtain a dropdown with all the types: As can be seen here the type is either sampler2D or samplerCube.
Reynolds's user avatar
  • 1,238
2 votes
Accepted

GLSL get min/max index of vec3

No, but the way this is written has a min of 3 branch's and max of 4. It would be better off with the plain old (x<y)&&(x<z) return 0, y<z return 1, return 2. You could also do a pure ...
pmw1234's user avatar
  • 3,219
1 vote
Accepted

is there an universal way to set a uniform?

You should use uniform buffer objects instead of individual glUniform calls. Then the uniforms are all stored in one block of memory which you tell OpenGL about. ...
Kevin Reid's user avatar
  • 1,106
1 vote
Accepted

Curved world effect shader for heterogeneous mesh faces

I somehow understand that it should not work, as quadratic bending and linear fragment interpolation between two vertices is different, Indeed. If you want to non-linearly distort a mesh object, then ...
Kevin Reid's user avatar
  • 1,106
1 vote

Numerically integratable fog volume feathering along a ray

The value of an integration is the area under the curve between the limits of integration. Since the density of the fog is constantly increasing starting at zero until it reaches the density of the ...
pmw1234's user avatar
  • 3,219
1 vote
Accepted

GLSL Uniform Layout Spec says member array stride alignment is rounded up to vec4?

It does mean exactly that. Whenever you have an array, it's treated as an array of vec4s with regards to the memory layout. So in your ...
Christian Rau's user avatar
1 vote
Accepted

How are strings for debugPrintfEXT handled in glsl?

They get help from the compiler. The line #extension GL_EXT_debug_printf : enable tells the compiler to look for and process debugPrintf statements inside the ...
pmw1234's user avatar
  • 3,219
1 vote
Accepted

Need help understanding this simplification/optimization for a very basic GLSL shader

Is this what you are looking for? fragCoord and iResolution are both of vec2 type and the ...
Enigmatisms's user avatar
1 vote

GLSL get min/max index of vec3

Here is another approach that handles the case where multiple components may be the minimum/maximum and you want to handle that. You calculate a "mask" that indicates whether the component ...
Mathis Brossier's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible