vectorlight ssao macro fix, z=w trick gl side for cloudlayer variants

This commit is contained in:
Azaezel 2018-12-09 19:48:18 -06:00
parent db84f5954e
commit 03690e2169
3 changed files with 3 additions and 1 deletions

View file

@ -41,6 +41,7 @@ out vec2 texCoord;
void main()
{
gl_Position = tMul(modelview, IN_pos);
gl_Position.z = gl_Position.w;
vec2 uv = IN_uv0;
uv += texOffset;

View file

@ -62,6 +62,7 @@ void main()
vec2 IN_uv0 = vTexCoord0.st;
gl_Position = modelview * IN_pos;
gl_Position.z = gl_Position.w;
// Offset the uv so we don't have a seam directly over our head.
vec2 uv = IN_uv0 + vec2( 0.5, 0.5 );

View file

@ -247,7 +247,7 @@ void main()
#endif //NO_SHADOW
// Sample the AO texture.
#ifdef USE_SSAO_MASK
surface.ao *= 1.0 - TORQUE_TEX2D( ssaoMask, viewportCoordToRenderTarget( uv0.xy, rtParams3 ) ).r;
surface.ao *= 1.0 - texture( ssaoMask, viewportCoordToRenderTarget( uv0.xy, rtParams3 ) ).r;
#endif
//get directional light contribution