summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderManager.cpp
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2014-08-20 10:57:31 -0700
committershuffle2 <godisgovernment@gmail.com>2014-08-20 10:57:31 -0700
commitd29e3331426823b0dcd49a7436a4a8a6bdf60dcf (patch)
tree84bbe066f736929fc1b4e381f3c719006070d409 /Source/Core/VideoCommon/VertexShaderManager.cpp
parenta09cf1d8f1bdc58de56b8fbb2d2282b8e59d2e69 (diff)
parenta9c33075f2f2b8ca6ffb699308a282e385a726b9 (diff)
Merge pull request #833 from shuffle2/msvc-improvements
misc improvements for msvc build. -Werror for msvc!
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp
index 6fc187726f..112c2498c9 100644
--- a/Source/Core/VideoCommon/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexShaderManager.cpp
@@ -285,9 +285,10 @@ void VertexShaderManager::SetConstants()
double(light.ddir[1]) * double(light.ddir[1]) +
double(light.ddir[2]) * double(light.ddir[2]);
norm = 1.0 / sqrt(norm);
- dstlight.dir[0] = light.ddir[0] * norm;
- dstlight.dir[1] = light.ddir[1] * norm;
- dstlight.dir[2] = light.ddir[2] * norm;
+ float norm_float = static_cast<float>(norm);
+ dstlight.dir[0] = light.ddir[0] * norm_float;
+ dstlight.dir[1] = light.ddir[1] * norm_float;
+ dstlight.dir[2] = light.ddir[2] * norm_float;
}
dirty = true;