mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-15 11:35:26 +02:00
Merge pull request #13200 from Cristo86/gles_ishazeenabled_error_fix
Fix isHazeEnabled() checks with 0.0 to fix GLES compiler error
This commit is contained in:
commit
026cae09f7
2 changed files with 4 additions and 4 deletions
|
@ -140,7 +140,7 @@ vec3 evalSkyboxGlobalColor(mat4 invViewMat, float shadowAttenuation, float obscu
|
||||||
color += directionalSpecular;
|
color += directionalSpecular;
|
||||||
|
|
||||||
// Attenuate the light if haze effect selected
|
// 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);
|
color = computeHazeColorKeyLightAttenuation(color, lightDirection, fragPositionWS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ vec3 evalGlobalLightingAlphaBlendedWithHaze(
|
||||||
color += (ambientSpecular + directionalSpecular) / opacity;
|
color += (ambientSpecular + directionalSpecular) / opacity;
|
||||||
|
|
||||||
// Haze
|
// 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 colorV4 = computeHazeColor(
|
||||||
vec4(color, 1.0), // fragment original color
|
vec4(color, 1.0), // fragment original color
|
||||||
positionES, // fragment position in eye coordinates
|
positionES, // fragment position in eye coordinates
|
||||||
|
@ -272,7 +272,7 @@ vec3 evalGlobalLightingAlphaBlendedWithHaze(
|
||||||
color += (ambientSpecular + directionalSpecular) / opacity;
|
color += (ambientSpecular + directionalSpecular) / opacity;
|
||||||
|
|
||||||
// Haze
|
// 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 colorV4 = computeHazeColor(
|
||||||
vec4(color, 1.0), // fragment original color
|
vec4(color, 1.0), // fragment original color
|
||||||
positionES, // fragment position in eye coordinates
|
positionES, // fragment position in eye coordinates
|
||||||
|
|
|
@ -42,7 +42,7 @@ in vec2 varTexCoord0;
|
||||||
out vec4 outFragColor;
|
out vec4 outFragColor;
|
||||||
|
|
||||||
void main(void) {
|
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;
|
discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue