1
votes

When we have unsigned floating point internal format and GL_UNSIGNED_BYTE does it clamps data to 0-1 ? what if image format is GL_FLOAT ? As floating points are not normalized, is there any case when the values will be clamped to 0-1 ?

In shader, floating point sampler will clamp data 0-1 or it will just return floating point data ? if it is not normalized, how will it determine the intensity of the color ?

1

1 Answers

2
votes

The way how data is normalized (or not) depends on the internal format of the texture.

  • Formats without any additional letters are normalized (GL_RGB, GL_RGBA, ...)
  • Formats with an additional F at the end are not normalized floating point (GL_RGB16F, GL_RGBA32F, ...)
  • Formats ending with I (GL_RGB16I, ...) are signed integer formats and require an isampler in the shader
  • Formats ending with UI (GL_RGB16UI, ...) are unsigned integer formats and require an usampler in the shader