summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GeometryShaderGen.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2014-12-03 22:35:34 +0100
committerJules Blok <jules.blok@gmail.com>2014-12-14 13:28:48 +0100
commitea2bcb44f0d860355fd60521d5fa9a37b6fb15a1 (patch)
tree9c03b2142f97dfd644d3a726ba93ed41575b7021 /Source/Core/VideoCommon/GeometryShaderGen.cpp
parent6fe7d530ed4e0eec54deb509745a5c17c2c50ae5 (diff)
Cosmetics
Diffstat (limited to 'Source/Core/VideoCommon/GeometryShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/GeometryShaderGen.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp
index b75eddd87a..187af8b088 100644
--- a/Source/Core/VideoCommon/GeometryShaderGen.cpp
+++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp
@@ -85,19 +85,19 @@ static inline void GenerateGeometryShader(T& out, u32 components, API_TYPE ApiTy
if (g_ActiveConfig.backend_info.bSupportsGSInstancing)
{
if (ApiType == API_OPENGL)
- out.Write("\tint l = gl_InvocationID;\n");
+ out.Write("\tint layer = gl_InvocationID;\n");
else
- out.Write("\tint l = InstanceID;\n");
+ out.Write("\tint layer = InstanceID;\n");
}
else
- out.Write("\tfor (int l = 0; l < %d; ++l) {\n", g_ActiveConfig.iStereoMode > 0 ? 2 : 1);
+ out.Write("\tfor (int layer = 0; layer < %d; ++layer) {\n", g_ActiveConfig.iStereoMode > 0 ? 2 : 1);
out.Write("\tfor (int i = 0; i < 3; ++i) {\n");
// Select the output layer
- out.Write("\t\tgs.layer = l;\n");
+ out.Write("\t\tgs.layer = layer;\n");
if (ApiType == API_OPENGL)
- out.Write("\t\tgl_Layer = l;\n");
+ out.Write("\t\tgl_Layer = layer;\n");
out.Write("\t\tf = o[i];\n");
out.Write("\t\tfloat4 pos = o[i].pos;\n");
@@ -111,8 +111,8 @@ static inline void GenerateGeometryShader(T& out, u32 components, API_TYPE ApiTy
// the depth value. This results in objects at a distance smaller than the convergence
// distance to seemingly appear in front of the screen.
// This formula is based on page 13 of the "Nvidia 3D Vision Automatic, Best Practices Guide"
- out.Write("\t\tf.clipPos.x = o[i].clipPos.x + " I_STEREOPARAMS"[l] * (o[i].clipPos.w - " I_STEREOPARAMS"[2]);\n");
- out.Write("\t\tpos.x = o[i].pos.x + " I_STEREOPARAMS"[l] * (o[i].pos.w - " I_STEREOPARAMS"[2]);\n");
+ out.Write("\t\tf.clipPos.x = o[i].clipPos.x + " I_STEREOPARAMS"[layer] * (o[i].clipPos.w - " I_STEREOPARAMS"[2]);\n");
+ out.Write("\t\tpos.x = o[i].pos.x + " I_STEREOPARAMS"[layer] * (o[i].pos.w - " I_STEREOPARAMS"[2]);\n");
}
out.Write("\t\tf.pos.x = pos.x;\n");