Another android shader compilation fix

This commit is contained in:
Olivier Prat 2018-11-08 11:44:47 +01:00
parent 05ac2fccb6
commit de2f1c52cc
2 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ vec4 packOcclusionOutput(float occlusion, float depth, vec3 eyeNormal) {
return vec4(occlusion, depth, eyeNormal.xy / eyeNormal.z);
#else
// Round to the nearest 1/256.0
depth *= 256;
depth *= 256.0;
float temp = floor(depth);
return vec4(occlusion, temp * (1.0 / 256.0), depth - temp, 0.0);
#endif
@ -45,7 +45,7 @@ void unpackOcclusionOutput(vec4 raw, out UnpackedOcclusion result) {
result.normal = normalize(vec3(raw.zw, 1.0));
#else
result.depth = (raw.y + raw.z / 256.0);
result.normal = vec3(0,0,1);
result.normal = vec3(0.0, 0.0, 1.0);
#endif
}

View file

@ -86,7 +86,7 @@ vec4 getBlurredOcclusion(ivec2 destPixelCoord, vec2 occlusionTexCoord, vec2 dept
#if SSAO_BILATERAL_BLUR_USE_NORMAL
vec3 fragNormal = getNormalEyeAtUV(depthTexCoord, 0.0);
#else
vec3 fragNormal = vec3(0, 0, 1);
vec3 fragNormal = vec3(0.0, 0.0, 1.0);
#endif
vec2 weightedSums = vec2(0.0);