Common.glsl 565 B

12345678910111213141516171819202122
  1. // This file contains common code for all shaders. It's optional but it's
  2. // recomended to include it
  3. #ifndef ANKI_SHADERS_COMMON_GLSL
  4. #define ANKI_SHADERS_COMMON_GLSL
  5. #ifndef DEFAULT_FLOAT_PRECISION
  6. #define DEFAULT_FLOAT_PRECISION highp
  7. #endif
  8. #ifndef DEFAULT_INT_PRECISION
  9. #define DEFAULT_INT_PRECISION highp
  10. #endif
  11. precision DEFAULT_FLOAT_PRECISION float;
  12. precision DEFAULT_FLOAT_PRECISION int;
  13. // Read from a render target texture
  14. #define textureFai(tex_, texc_) texture(tex_, texc_)
  15. //#define textureFai(tex_, texc_) textureLod(tex_, texc_, 0.0)
  16. #endif