Opengl 4.3 support

broken image
broken image

Zeros are used if R, G, or B is missing, while a missing Alpha always resolves to 1. The components not stored by the image format are filled in automatically. When the shader samples such a texture, it will still resolve to a 4-value RGBA vector.

broken image

Image formats do not have to store each component. Signed integers are 2's complement integer values. Integral formats are also divided into signed and unsigned integers. Unsigned normalized integers store floating-point values on the range, while signed normalized integers store values on the range. Normalized integer formats themselves are broken down into 2 kinds: unsigned normalized and signed normalized. Both normalized integer and floating-point formats will resolve, in the shader, to a vector of floating-point values, whereas integral formats will resolve to a vector of integers. They're just numbers it's how you use them that defines their meaning.Ĭolor formats can be stored in one of 3 ways: normalized integers, floating-point, or integral. Shaders are arbitrary programs they can consider a color value to represent a texture coordinate, a Fresnel index, a normal, or anything else they so desire. Note: Technically, any of the 4 color values can take on whatever meaning you give them in a shader.

broken image