Fixed flipped reflection and skybox on x-axis, enable anisotropy (Fixes #232)
This commit is contained in:
parent
13eed42bfb
commit
9ce827b3f3
7 changed files with 32 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
}
|
||||
Binary file not shown.
|
|
@ -21,5 +21,6 @@ out gl_PerVertex
|
|||
void main()
|
||||
{
|
||||
outUVW = inPos;
|
||||
outUVW.x *= -1.0;
|
||||
gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue