Răsfoiți Sursa

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

Azaezel 6 ani în urmă
părinte
comite
ab5034b1c2

+ 1 - 0
Templates/Full/game/shaders/common/gl/basicCloudsV.glsl

@@ -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;

+ 1 - 0
Templates/Full/game/shaders/common/gl/cloudLayerV.glsl

@@ -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 );

+ 1 - 1
Templates/Full/game/shaders/common/lighting/advanced/gl/vectorLightP.glsl

@@ -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