I have faced with such a feature of the GLSL compiler. If the variable is not used in the shader, then find its location there would be no possibility, it is simply truncated from the shader.

The search function on behalf of the Uniform position.
int loc = glGetUniformLocationARB (, );

Moreover, even if caught insidious, like the variable is used, but the result of further calculations is not, and that’s why, again, to find the ancestral variable is not possible.

GLSL: missing uniform location
Tagged on:         

2 thoughts on “GLSL: missing uniform location

  • Monday April 25th, 2011 at 10:29 PM

    Какая же это ошибка??
    Есть волшебное слово “оптимизация”, это она и есть.

  • Monday April 25th, 2011 at 10:53 PM

    ? то правда, эта запись больше похожа на “мысли в слух” после длительной отладки и недочитанной документации )

Leave a Reply

Your email address will not be published. Required fields are marked *