summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderGen.cpp
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2014-01-31 06:13:26 -0800
committerTony Wasserka <neobrainx@gmail.com>2014-01-31 06:13:26 -0800
commit3dd31fe22b2c3b53fa9830b9dc743b87773aec34 (patch)
treeecb2eda85933d52eae117b8a20374b77dd09ff17 /Source/Core/VideoCommon/VertexShaderGen.cpp
parent0735fb7a52876939bebda82be89145b1aa344606 (diff)
parenta65162f1cd345b8f206fd01e19ac261d09ac291b (diff)
Merge pull request #11 from degasus/VertexLoaderCleanup
Vertex loader cleanup.
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp
index 78d54492ac..57742889eb 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -168,7 +168,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
out.Write(" float%d tex%d : TEXCOORD%d,\n", hastexmtx ? 3 : 2, i, i);
}
if (components & VB_HAS_POSMTXIDX)
- out.Write(" float4 blend_indices : BLENDINDICES,\n");
+ out.Write(" float4 fposmtx : BLENDINDICES,\n");
out.Write(" float4 rawpos : POSITION) {\n");
}
out.Write("VS_OUTPUT o;\n");
@@ -176,10 +176,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
// transforms
if (components & VB_HAS_POSMTXIDX)
{
- if (api_type == API_D3D)
- out.Write("int posmtx = blend_indices.x * 255.0;\n"); // TODO: Ugly, should use an integer instead
- else
- out.Write("int posmtx = int(fposmtx);\n");
+ out.Write("int posmtx = int(fposmtx * 255.0);\n"); // TODO: Ugly, should use an integer instead
if (is_writing_shadercode && (DriverDetails::HasBug(DriverDetails::BUG_NODYNUBOACCESS) && !DriverDetails::HasBug(DriverDetails::BUG_ANNIHILATEDUBOS)) )
{