mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Merge pull request #6300 from JonnyH/WIP/glsl-es-implicit-int-float-conversions-in-gpu-texture-decode
GLSL-ES doesn't allow implicit int/uint conversions
This commit is contained in:
@ -1281,14 +1281,14 @@ static const std::map<TextureFormat, DecodingShaderInfo> s_decoding_shader_info{
|
|||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
uvec2 uv = gl_GlobalInvocationID.xy;
|
uvec2 uv = gl_GlobalInvocationID.xy;
|
||||||
int buffer_pos = int(u_src_offset + (uv.y * u_src_row_stride) + (uv.x / 2));
|
int buffer_pos = int(u_src_offset + (uv.y * u_src_row_stride) + (uv.x / 2u));
|
||||||
vec4 yuyv = texelFetch(s_input_buffer, buffer_pos);
|
vec4 yuyv = vec4(texelFetch(s_input_buffer, buffer_pos));
|
||||||
|
|
||||||
float y = mix(yuyv.r, yuyv.b, (uv.x & 1u) == 1u);
|
float y = mix(yuyv.r, yuyv.b, (uv.x & 1u) == 1u);
|
||||||
|
|
||||||
float yComp = 1.164 * (y - 16);
|
float yComp = 1.164 * (y - 16.0);
|
||||||
float uComp = yuyv.g - 128;
|
float uComp = yuyv.g - 128.0;
|
||||||
float vComp = yuyv.a - 128;
|
float vComp = yuyv.a - 128.0;
|
||||||
|
|
||||||
vec4 rgb = vec4(yComp + (1.596 * vComp),
|
vec4 rgb = vec4(yComp + (1.596 * vComp),
|
||||||
yComp - (0.813 * vComp) - (0.391 * uComp),
|
yComp - (0.813 * vComp) - (0.391 * uComp),
|
||||||
|
Reference in New Issue
Block a user