From ec77ba3e99106571cfa70a762bbf570ab459b26c Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Sat, 31 Oct 2009 03:35:36 +0000 Subject: [PATCH] fixed z textures, don't know where this is used but a fix is a fix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4486 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/PixelShaderManager.cpp | 7 ++++--- Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp | 9 +++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp index deb4646a27..4535671d53 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp @@ -113,8 +113,8 @@ void PixelShaderManager::SetConstants() case 0: // 8 bits // this breaks the menu in SSBM when it is set correctly to - //ftemp[0] = ffrac/(65536.0f); ftemp[1] = 0; ftemp[2] = 0; ftemp[3] = 0; - ftemp[0] = ffrac/65536.0f; ftemp[1] = ffrac/256.0f; ftemp[2] = ffrac; ftemp[3] = 0; + ftemp[0] = ffrac/(65536.0f); ftemp[1] = 0; ftemp[2] = 0; ftemp[3] = 0; + //ftemp[0] = ffrac/65536.0f; ftemp[1] = ffrac/256.0f; ftemp[2] = ffrac; ftemp[3] = 0; break; case 1: // 16 bits @@ -122,7 +122,8 @@ void PixelShaderManager::SetConstants() break; case 2: // 24 bits - ftemp[0] = ffrac; ftemp[1] = ffrac/256.0f; ftemp[2] = ffrac/65536.0f; ftemp[3] = 0; + ftemp[0] = ffrac/65536.0f; ftemp[1] = ffrac/256.0f; ftemp[2] = ffrac; ftemp[3] = 0; + //ftemp[0] = ffrac; ftemp[1] = ffrac/256.0f; ftemp[2] = ffrac/65536.0f; ftemp[3] = 0; break; } SetPSConstant4fv(C_ZBIAS, ftemp); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp index dbae586853..13f8b65156 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp @@ -117,13 +117,10 @@ void PixelShaderCache::Init() "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "PARAM K0 = { 65535.0, 255.0 };\n" + "PARAM K0 = { 65535.0, 255.0,1.0};\n" "TEX R2, fragment.texcoord[0], texture[0], RECT;\n" - "MUL R0.x, R2.x, K0.x;\n" - "FRC R0.x, R0.x;\n" - "MUL R0.y, R2.x, K0.y;\n" - "FRC R0.y, R0.y;\n" - "MOV R0.z, R2.x;\n" + "MUL R0, R2.x, K0;\n" + "FRC R0, R0;\n" "DP4 R1.x, R0, program.env[%d];\n" "DP4 R1.y, R0, program.env[%d];\n" "DP4 R1.z, R0, program.env[%d];\n"