Browse Source

removes w=z trick (was causing fisheye, effectively)

Azaezel 9 years ago
parent
commit
d79b9a2988

+ 1 - 1
Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp

@@ -2805,7 +2805,7 @@ void DeferredSkyGLSL::processVert( Vector<ShaderComponent*> &componentList,
 {
    Var *outPosition = (Var*)LangElement::find( "gl_Position" );
    MultiLine *meta = new MultiLine;
-   meta->addStatement( new GenOp( "   @.w = @.z;\r\n", outPosition, outPosition ) );
+   //meta->addStatement( new GenOp( "   @.w = @.z;\r\n", outPosition, outPosition ) );
 
    output = meta;
 }

+ 1 - 1
Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp

@@ -3000,7 +3000,7 @@ void DeferredSkyHLSL::processVert( Vector<ShaderComponent*> &componentList,
 {
    Var *outPosition = (Var*)LangElement::find( "hpos" );
    MultiLine *meta = new MultiLine;
-   meta->addStatement( new GenOp( "   @.w = @.z;\r\n", outPosition, outPosition ) );
+   //meta->addStatement( new GenOp( "   @.w = @.z;\r\n", outPosition, outPosition ) );
 
    output = meta;
 }

+ 1 - 1
Templates/Empty/game/core/scripts/client/lighting/advanced/deferredShading.cs

@@ -55,7 +55,7 @@ new ShaderData( AL_DeferredShader )
 
 singleton PostEffect( AL_DeferredShading )
 {
-   renderTime = "PFXBeforeBin";
+   renderTime = "PFXAfterBin";
    renderBin = "SkyBin";
    shader = AL_DeferredShader;
    stateBlock = AL_DeferredShadingState;

+ 0 - 1
Templates/Empty/game/shaders/common/basicCloudsV.hlsl

@@ -46,7 +46,6 @@ ConnectData main( CloudVert IN )
    ConnectData OUT;
 
    OUT.hpos = mul(modelview, float4(IN.pos,1.0));
-   OUT.hpos.w = OUT.hpos.z;
 
    float2 uv = IN.uv0;
    uv += texOffset;

+ 0 - 1
Templates/Empty/game/shaders/common/cloudLayerV.hlsl

@@ -63,7 +63,6 @@ ConnectData main( CloudVert IN )
    ConnectData OUT;
 
    OUT.hpos = mul(modelview, float4(IN.pos,1.0));
-   OUT.hpos.w = OUT.hpos.z;
    // Offset the uv so we don't have a seam directly over our head.
    float2 uv = IN.uv0 + float2( 0.5, 0.5 );
    

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

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

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

@@ -62,7 +62,6 @@ void main()
    vec2 IN_uv0 = vTexCoord0.st;
 
    gl_Position = modelview * IN_pos;
-   gl_Position.w = gl_Position.z;
    
    // 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/core/scripts/client/lighting/advanced/deferredShading.cs

@@ -55,7 +55,7 @@ new ShaderData( AL_DeferredShader )
 
 singleton PostEffect( AL_DeferredShading )
 {
-   renderTime = "PFXBeforeBin";
+   renderTime = "PFXAfterBin";
    renderBin = "SkyBin";
    shader = AL_DeferredShader;
    stateBlock = AL_DeferredShadingState;

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

@@ -46,7 +46,6 @@ ConnectData main( CloudVert IN )
    ConnectData OUT;
 
    OUT.hpos = mul(modelview, float4(IN.pos,1.0));
-   OUT.hpos.w = OUT.hpos.z;
 
    float2 uv = IN.uv0;
    uv += texOffset;

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

@@ -63,7 +63,6 @@ ConnectData main( CloudVert IN )
    ConnectData OUT;
 
    OUT.hpos = mul(modelview, float4(IN.pos,1.0));
-   OUT.hpos.w = OUT.hpos.z;
    // Offset the uv so we don't have a seam directly over our head.
    float2 uv = IN.uv0 + float2( 0.5, 0.5 );
    

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

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

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

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