Tips
A list of things to take care of while writing OpenGL/GLSL programs. Some might seem stupid, but I faced those problems in the past and hell some were really nasty for a novice. So I decided to write them down here to help others learning..
[GLSL]
- NEVER EVER use the discard keyword when doing MRTs !! By doing so, the discard keyword will create a blackhole corresponding to the current fragment that will suck into itself every other fragment in the same x,y coordinate on different RTs…
[OpenGL]
- Initialize textures before using them in Framebuffer Objects !
- FP16 numbers only have 11 bits of significand (10 exponent bits and the implied 1.). The rest of the bits are exponent (5 bits) and a sign bit.
- What are the most expensive state changes?
- Binding a Shader
- Binding a Texture
- Updating a GLSL texture sampler uniform
- VBO data pointers
- Everything else



