summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderGen.cpp
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2014-03-14 22:57:40 +0100
committerTony Wasserka <neobrainx@gmail.com>2014-03-14 22:57:40 +0100
commita9a8c730748b8c8a2e83feb4c38626361cf9daa1 (patch)
treeb847e06006198ac3d5b5dbb701ff4b1ab4e2de00 /Source/Core/VideoCommon/VertexShaderGen.cpp
parent450bde27bb2d7a47335c9800d3a29e012c9d67e9 (diff)
parent0f81cbd6be009ac14f036a05db8f4e516ea626d0 (diff)
Merge pull request #68 from neobrain/tev_fixes_new
Change pixel processing to use integer arithmetic.
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp
index a4893ce2dc..448b0deb04 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -87,8 +87,9 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
DeclareUniform(out, api_type, C_POSNORMALMATRIX, "float4", I_POSNORMALMATRIX"[6]");
DeclareUniform(out, api_type, C_PROJECTION, "float4", I_PROJECTION"[4]");
- DeclareUniform(out, api_type, C_MATERIALS, "float4", I_MATERIALS"[4]");
- DeclareUniform(out, api_type, C_LIGHTS, "float4", I_LIGHTS"[40]");
+ DeclareUniform(out, api_type, C_MATERIALS, "int4", I_MATERIALS"[4]");
+ DeclareUniform(out, api_type, C_LIGHT_COLORS, "int4", I_LIGHT_COLORS"[8]");
+ DeclareUniform(out, api_type, C_LIGHTS, "float4", I_LIGHTS"[32]");
DeclareUniform(out, api_type, C_TEXMATRICES, "float4", I_TEXMATRICES"[24]");
DeclareUniform(out, api_type, C_TRANSFORMMATRICES, "float4", I_TRANSFORMMATRICES"[64]");
DeclareUniform(out, api_type, C_NORMALMATRICES, "float4", I_NORMALMATRICES"[32]");
@@ -217,7 +218,7 @@ 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");
- out.Write("float4 mat, lacc;\n"
+ out.Write("int4 lacc;\n"
"float3 ldir, h;\n"
"float dist, dist2, attn;\n");
@@ -230,7 +231,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
out.Write("o.colors_0 = float4(1.0, 1.0, 1.0, 1.0);\n");
}
- GenerateLightingShader<T>(out, uid_data.lighting, components, I_MATERIALS, I_LIGHTS, "color", "o.colors_");
+ GenerateLightingShader<T>(out, uid_data.lighting, components, I_MATERIALS, I_LIGHT_COLORS, I_LIGHTS, "color", "o.colors_");
if (xfregs.numChan.numColorChans < 2)
{