Fixed flipped reflection and skybox on x-axis, enable anisotropy (Fixes #232)

This commit is contained in:
saschawillems 2016-09-17 10:31:04 +02:00
parent 13eed42bfb
commit 9ce827b3f3
7 changed files with 32 additions and 3 deletions

View file

@ -20,6 +20,7 @@ void main()
vec3 cR = reflect (cI, normalize(inNormal));
cR = vec3(inInvModelView * vec4(cR, 0.0));
cR.x *= -1.0;
vec4 color = texture(samplerColor, cR, inLodBias);
@ -31,5 +32,4 @@ void main()
vec3 diffuse = max(dot(N, L), 0.0) * vec3(1.0);
vec3 specular = pow(max(dot(R, V), 0.0), 16.0) * vec3(0.5);
outFragColor = vec4(ambient + diffuse * color.rgb + specular, 1.0);
}