diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-11-04 01:12:00 +0100 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-11-23 14:27:40 +0100 |
| commit | 51a4d6a4bef09e7b270ee26e5b2889379819da45 (patch) | |
| tree | f7983df75938b579a9c94695852619372e1ce25c /Source/Core/VideoCommon/VertexShaderGen.cpp | |
| parent | ee76c03160b72731facbce135be26d7ef8cebba5 (diff) | |
GeometryShader: Adjust positions after projection.
By adjusting the positions in clip space we can avoid the re-projection.
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderGen.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index fd2ee7f3e6..700bd0d2a6 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -52,9 +52,6 @@ static inline void GenerateVSOutputStruct(T& object, API_TYPE api_type) if (g_ActiveConfig.bEnablePixelLighting) DefineVSOutputStructMember(object, api_type, "float4", "Normal", -1, "TEXCOORD", xfmem.numTexGen.numTexGens + 1); - if (g_ActiveConfig.iStereoMode > 0) - DefineVSOutputStructMember(object, api_type, "float4", "rawpos", -1, "POSITION"); - object.Write("};\n"); } @@ -125,6 +122,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ out.Write("in float%d tex%d; // ATTR%d,\n", hastexmtx ? 3 : 2, i, SHADER_TEXTURE0_ATTRIB + i); } + uid_data->stereo = g_ActiveConfig.iStereoMode > 0; out.Write("centroid out VS_OUTPUT %s;\n", (g_ActiveConfig.iStereoMode > 0) ? "v" : "o"); out.Write("void main()\n{\n"); @@ -205,10 +203,6 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ out.Write("o.pos = float4(dot(" I_PROJECTION"[0], pos), dot(" I_PROJECTION"[1], pos), dot(" I_PROJECTION"[2], pos), dot(" I_PROJECTION"[3], pos));\n"); - uid_data->stereo = g_ActiveConfig.iStereoMode > 0; - if (g_ActiveConfig.iStereoMode > 0) - out.Write("o.rawpos = pos;\n"); - out.Write("int4 lacc;\n" "float3 ldir, h;\n" "float dist, dist2, attn;\n"); |
