Is it possible to find the internal texture format in the shader (glsl)?
For example, if I have a texture with a format GL_RG, is it possible to recognize in the shader that the blue and alpha values are "constant" and can be ignored?
GL_RG
I know that I can use a form to pass a texture type from C ++ to shaders. But is there an “internal” way to learn from a shader?
No, I do not believe that there is anything that will give you this information directly.
GLSL (4.50 ), , "8.9.1. ", 158. :
textureSize
textureQueryLod
textureQueryLevels
textureSamples
, - , , , , .
Source: https://habr.com/ru/post/1617745/More articles:Building project from terminal causes compiler errors - build-processassert (3/2 == 1): Does it work? - c ++How to connect to a mobile connection using android? - androidSafe rounding to the next smaller - c ++jQuery is a simple download that takes too long for the first call - jqueryThen () definition after promise is found - javascriptHow to run Xcode 5.1.1 on EL Capitan 10.11.1? - iosPandas dataframe plot with subtitles (subplots = True): Place a legend and use tight layout - pythonSearch for a position with the same number in the row and column - algorithmGetting the value with the stab lens - haskellAll Articles