mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:31:13 +02:00
Make ambient light header GLES safe
This commit is contained in:
parent
29d6813963
commit
7565e08657
1 changed files with 4 additions and 0 deletions
|
@ -16,9 +16,13 @@ uniform samplerCube skyboxMap;
|
||||||
vec4 evalSkyboxLight(vec3 direction, float lod) {
|
vec4 evalSkyboxLight(vec3 direction, float lod) {
|
||||||
// textureQueryLevels is not available until #430, so we require explicit lod
|
// textureQueryLevels is not available until #430, so we require explicit lod
|
||||||
// float mipmapLevel = lod * textureQueryLevels(skyboxMap);
|
// float mipmapLevel = lod * textureQueryLevels(skyboxMap);
|
||||||
|
|
||||||
|
#if !defined(GL_ES)
|
||||||
float filterLod = textureQueryLod(skyboxMap, direction).x;
|
float filterLod = textureQueryLod(skyboxMap, direction).x;
|
||||||
// Keep texture filtering LOD as limit to prevent aliasing on specular reflection
|
// Keep texture filtering LOD as limit to prevent aliasing on specular reflection
|
||||||
lod = max(lod, filterLod);
|
lod = max(lod, filterLod);
|
||||||
|
#endif
|
||||||
|
|
||||||
return textureLod(skyboxMap, direction, lod);
|
return textureLod(skyboxMap, direction, lod);
|
||||||
}
|
}
|
||||||
<@endfunc@>
|
<@endfunc@>
|
||||||
|
|
Loading…
Reference in a new issue