mirror of
https://github.com/lubosz/overte.git
synced 2025-04-16 15:30:11 +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) {
|
||||
// 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@>
|
||||
|
|
Loading…
Reference in a new issue