Update spherical environment mapping shaders to reflect camera orientation for normals
This commit is contained in:
parent
70aa438b11
commit
10afc74051
2 changed files with 1 additions and 3 deletions
|
|
@ -27,10 +27,8 @@ void main()
|
|||
mat4 modelView = ubo.view * ubo.model;
|
||||
outEyePos = normalize( vec3( modelView * inPos ) );
|
||||
outTexIndex = ubo.texIndex;
|
||||
// outNormal = normalize( mat3(ubo.normal) * inNormal );
|
||||
outNormal = normalize(inNormal);
|
||||
outNormal = normalize( mat3(ubo.normal) * inNormal );
|
||||
vec3 r = reflect( outEyePos, outNormal );
|
||||
float m = 2.0 * sqrt( pow(r.x, 2.0) + pow(r.y, 2.0) + pow(r.z + 1.0, 2.0));
|
||||
//vN = r.xy / m + .5;
|
||||
gl_Position = ubo.projection * modelView * inPos;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue