Top "Fragment-shader" questions

A GPU program used in rendering.

OpenGL - sampler array limit?

I have two sampler arrays in my fragment shader: uniform sampler2D shadowMaps[12]; uniform samplerCubeShadow shadowMapsCube[12]; This works fine on …

opengl glsl fragment-shader
What does iResolution mean in a shader?

I am new to GLSL. I find there is a variable iResolution in every demo https://www.shadertoy.com/new. …

glsl fragment-shader
Get accurate integer modulo in WebGL shader

I want to get an accurate modulo of x and y in a WebGL fragment shader. x and y are …

webgl shader fragment-shader
Bind an SSBO to a fragment shader

I have a an SSBO which stores vec4 colour values for each pixel on screen and is pre populated with …

opengl glsl fragment-shader compute-shader
GLSL shader not unrolling loop when needed

My 9600GT hates me. Fragment shader: #version 130 uint aa[33] = uint[33]( 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0 ); void main() { int i=0; int a=26; for (i=0; i<…

opengl glsl fragment-shader loop-unrolling