Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from May 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp
Expand Up @@ -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;
}
Expand Up @@ -55,7 +55,7 @@ singleton ShaderData( DeferredColorShader )

singleton PostEffect( AL_DeferredShading )
{
renderTime = "PFXBeforeBin";
renderTime = "PFXAfterBin";
renderBin = "SkyBin";
shader = AL_DeferredShader;
stateBlock = AL_DeferredShadingState;
Expand Down
1 change: 0 additions & 1 deletion Templates/Empty/game/shaders/common/basicCloudsV.hlsl
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Templates/Empty/game/shaders/common/cloudLayerV.hlsl
Expand Up @@ -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 );

Expand Down
1 change: 0 additions & 1 deletion Templates/Empty/game/shaders/common/gl/basicCloudsV.glsl
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Templates/Empty/game/shaders/common/gl/cloudLayerV.glsl
Expand Up @@ -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 );
Expand Down
Expand Up @@ -55,7 +55,7 @@ singleton ShaderData( DeferredColorShader )

singleton PostEffect( AL_DeferredShading )
{
renderTime = "PFXBeforeBin";
renderTime = "PFXAfterBin";
renderBin = "SkyBin";
shader = AL_DeferredShader;
stateBlock = AL_DeferredShadingState;
Expand Down
1 change: 0 additions & 1 deletion Templates/Full/game/shaders/common/basicCloudsV.hlsl
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Templates/Full/game/shaders/common/cloudLayerV.hlsl
Expand Up @@ -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 );

Expand Down
1 change: 0 additions & 1 deletion Templates/Full/game/shaders/common/gl/basicCloudsV.glsl
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Templates/Full/game/shaders/common/gl/cloudLayerV.glsl
Expand Up @@ -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 );
Expand Down