mirror of https://git.suyu.dev/suyu/suyu
Texture Cache: Correct conversion shaders.
This commit is contained in:
parent
0902119302
commit
1e474fb9d1
|
@ -9,7 +9,7 @@ layout(binding = 0) uniform sampler2D color_texture;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
ivec2 coord = ivec2(gl_FragCoord.xy);
|
ivec2 coord = ivec2(gl_FragCoord.xy);
|
||||||
uvec4 color = uvec4(texelFetch(color_texture, coord, 0).rgba * (exp2(8) - 1.0f));
|
uvec4 color = uvec4(texelFetch(color_texture, coord, 0).abgr * (exp2(8) - 1.0f));
|
||||||
uvec4 bytes = color << uvec4(24, 16, 8, 0);
|
uvec4 bytes = color << uvec4(24, 16, 8, 0);
|
||||||
uint depth_stencil_unorm = bytes.x | bytes.y | bytes.z | bytes.w;
|
uint depth_stencil_unorm = bytes.x | bytes.y | bytes.z | bytes.w;
|
||||||
|
|
||||||
|
|
|
@ -19,5 +19,5 @@ void main() {
|
||||||
lowp uint stencil_val = textureLod(stencil_tex, coord, 0).r;
|
lowp uint stencil_val = textureLod(stencil_tex, coord, 0).r;
|
||||||
highp uvec4 components =
|
highp uvec4 components =
|
||||||
uvec4(stencil_val, (uvec3(depth_val) >> uvec3(24u, 16u, 8u)) & 0x000000FFu);
|
uvec4(stencil_val, (uvec3(depth_val) >> uvec3(24u, 16u, 8u)) & 0x000000FFu);
|
||||||
color = vec4(components) / (exp2(8.0) - 1.0);
|
color.abgr = vec4(components) / (exp2(8.0) - 1.0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue