diff --git a/rpcs3/Emu/RSX/GL/GLCommonDecompiler.cpp b/rpcs3/Emu/RSX/GL/GLCommonDecompiler.cpp index ab8c4872e3..6f22b3f266 100644 --- a/rpcs3/Emu/RSX/GL/GLCommonDecompiler.cpp +++ b/rpcs3/Emu/RSX/GL/GLCommonDecompiler.cpp @@ -81,7 +81,7 @@ std::string getFunctionImpl(FUNCTION f) case FUNCTION::FUNCTION_VERTEX_TEXTURE_FETCH2D: return "textureLod($t, $0.xy, 0)"; case FUNCTION::FUNCTION_TEXTURE_SAMPLE2D_DEPTH_RGBA: - return "texture2DReconstruct($t, $0.xy)"; + return "texture2DReconstruct($t, $0.xy * $t_coord_scale)"; } } @@ -123,9 +123,9 @@ void insert_glsl_legacy_function(std::ostream& OS) //NOTE: We lose precision if we just store depth value into 8-bit textures i.e (depth, 0, 0) //NOTE2: After testing with GOW, the w component is either the original depth or wraps around to the x component //Since component.r == depth_value with some precision loss, just use the precise depth value for now (further testing needed) - OS << "highp vec4 texture2DReconstruct(sampler2D tex, vec2 coord)\n"; + OS << "vec4 texture2DReconstruct(sampler2D tex, vec2 coord)\n"; OS << "{\n"; - OS << " highp float depth_value = texture(tex, coord.xy).r;\n"; + OS << " float depth_value = texture(tex, coord.xy).r;\n"; OS << " uint value = uint(depth_value * 16777215);\n"; OS << " uint b = (value & 0xff);\n"; OS << " uint g = (value >> 8) & 0xff;\n"; diff --git a/rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp b/rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp index f8be66576f..acd8f7ec88 100644 --- a/rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp +++ b/rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp @@ -62,7 +62,7 @@ namespace vk case FUNCTION::FUNCTION_TEXTURE_SAMPLE2D_LOD: return "textureLod($t, $0.xy * texture_parameters[$_i].xy, $1.x)"; case FUNCTION::FUNCTION_TEXTURE_SAMPLE2D_GRAD: - return "textureGrad($t, $0.xy, $1.xy, $2.xy)"; // Note: $1.x is bias + return "textureGrad($t, $0.xy * texture_parameters[$_i].xy, $1.xy, $2.xy)"; // Note: $1.x is bias case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE: return "texture($t, $0.xyz)"; case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_PROJ: