Tag Info

New answers tagged


The value 127 / 255 is an integer division and always has the value zero. You want vec3(127.0 / 255.0, 0.0, 0.0) instead.


By default the output variable (outputColor) is bound to location 0. For a fragment shader this specifies the color value to be used for that fragment for the framebuffer object in position 0. You can bind the output variable to different locations in the application code using glBindFragDataLocation() or in the shader like this layout(location = 0) out ...

Top 50 recent answers are included