mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 05:03:52 +02:00
Check isHazeEnabled() vs 0.0 to compile on GLES
This commit is contained in:
parent
efca568dbe
commit
c7edf72f71
2 changed files with 4 additions and 4 deletions
|
@ -140,7 +140,7 @@ vec3 evalSkyboxGlobalColor(mat4 invViewMat, float shadowAttenuation, float obscu
|
|||
color += directionalSpecular;
|
||||
|
||||
// Attenuate the light if haze effect selected
|
||||
if ((isHazeEnabled() > 0) && (hazeParams.hazeMode & HAZE_MODE_IS_KEYLIGHT_ATTENUATED) == HAZE_MODE_IS_KEYLIGHT_ATTENUATED) {
|
||||
if ((isHazeEnabled() > 0.0) && (hazeParams.hazeMode & HAZE_MODE_IS_KEYLIGHT_ATTENUATED) == HAZE_MODE_IS_KEYLIGHT_ATTENUATED) {
|
||||
color = computeHazeColorKeyLightAttenuation(color, lightDirection, fragPositionWS);
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ vec3 evalGlobalLightingAlphaBlendedWithHaze(
|
|||
color += (ambientSpecular + directionalSpecular) / opacity;
|
||||
|
||||
// Haze
|
||||
if ((isHazeEnabled() > 0) && (hazeParams.hazeMode & HAZE_MODE_IS_ACTIVE) == HAZE_MODE_IS_ACTIVE) {
|
||||
if ((isHazeEnabled() > 0.0) && (hazeParams.hazeMode & HAZE_MODE_IS_ACTIVE) == HAZE_MODE_IS_ACTIVE) {
|
||||
vec4 colorV4 = computeHazeColor(
|
||||
vec4(color, 1.0), // fragment original color
|
||||
positionES, // fragment position in eye coordinates
|
||||
|
@ -272,7 +272,7 @@ vec3 evalGlobalLightingAlphaBlendedWithHaze(
|
|||
color += (ambientSpecular + directionalSpecular) / opacity;
|
||||
|
||||
// Haze
|
||||
if ((isHazeEnabled() > 0) && (hazeParams.hazeMode & HAZE_MODE_IS_ACTIVE) == HAZE_MODE_IS_ACTIVE) {
|
||||
if ((isHazeEnabled() > 0.0) && (hazeParams.hazeMode & HAZE_MODE_IS_ACTIVE) == HAZE_MODE_IS_ACTIVE) {
|
||||
vec4 colorV4 = computeHazeColor(
|
||||
vec4(color, 1.0), // fragment original color
|
||||
positionES, // fragment position in eye coordinates
|
||||
|
|
|
@ -42,7 +42,7 @@ in vec2 varTexCoord0;
|
|||
out vec4 outFragColor;
|
||||
|
||||
void main(void) {
|
||||
if ((isHazeEnabled() == 0) || (hazeParams.hazeMode & HAZE_MODE_IS_ACTIVE) != HAZE_MODE_IS_ACTIVE) {
|
||||
if ((isHazeEnabled() == 0.0) || (hazeParams.hazeMode & HAZE_MODE_IS_ACTIVE) != HAZE_MODE_IS_ACTIVE) {
|
||||
discard;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue