From d9f1523a7b2383d94768dd4fb5c82c62ef6395be Mon Sep 17 00:00:00 2001 From: Andrew Wickham Date: Mon, 30 Nov 2015 13:35:46 -0800 Subject: [PATCH] Make cast from int to float explicit in shader This should fix this panic message I saw when playing Super Mario Strikers: Failed to compile pixel shader [...]: error C7011: implicit cast from "int" to "float" --- Source/Core/VideoCommon/PixelShaderGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index a1cfcc4611..4254334d6c 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -564,7 +564,7 @@ static inline T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType // Opengl has reversed vertical screenspace coordiantes if (ApiType == API_OPENGL) - out.Write("\tscreenpos.y = %i - screenpos.y;\n", EFB_HEIGHT); + out.Write("\tscreenpos.y = %i.0 - screenpos.y;\n", EFB_HEIGHT); out.Write("\tint zCoord = int(" I_ZSLOPE".z + " I_ZSLOPE".x * screenpos.x + " I_ZSLOPE".y * screenpos.y);\n"); }