mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
rsx/vk/gl: Minor fixes
This commit is contained in:
parent
6a9eef0382
commit
b50d5107b3
2 changed files with 4 additions and 4 deletions
|
@ -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";
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue