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

This commit is contained in:
Azaezel 2016-05-18 06:38:13 -05:00
parent 3262c004a5
commit d79b9a2988
12 changed files with 4 additions and 12 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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