From 7565e08657f69ca3b010cc7dffbda309da008650 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Sun, 28 Jan 2018 14:40:25 -0800 Subject: [PATCH] Make ambient light header GLES safe --- libraries/render-utils/src/LightAmbient.slh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/render-utils/src/LightAmbient.slh b/libraries/render-utils/src/LightAmbient.slh index b482d979d3..2f963e01cc 100644 --- a/libraries/render-utils/src/LightAmbient.slh +++ b/libraries/render-utils/src/LightAmbient.slh @@ -16,9 +16,13 @@ uniform samplerCube skyboxMap; vec4 evalSkyboxLight(vec3 direction, float lod) { // textureQueryLevels is not available until #430, so we require explicit lod // float mipmapLevel = lod * textureQueryLevels(skyboxMap); + +#if !defined(GL_ES) float filterLod = textureQueryLod(skyboxMap, direction).x; // Keep texture filtering LOD as limit to prevent aliasing on specular reflection lod = max(lod, filterLod); +#endif + return textureLod(skyboxMap, direction, lod); } <@endfunc@>