libobs: Fix tex.Load lookup (needs int3, not int2)
libobs' shader language is basically HLSL, and tex.Load uses an int3 for 2D textures, with texture mipmap index for the last component. This bug bypassed testing because the front-end automatically switches to OpenGL if D3D11 initialization fails, and when converted to GLSL, works fine because texelFetch only requires two components. This also means there's a bug in GLSL shader conversion code, because it's essentially ignoring the third component when it shouldn't be.
This commit is contained in:
parent
5ad446b4b2
commit
f9b5da513a
@ -242,8 +242,9 @@ float4 PSPlanar444(VertInOut vert_in) : TARGET
|
||||
|
||||
float GetIntOffsetColor(int offset)
|
||||
{
|
||||
return image.Load(int2(offset % int_input_width,
|
||||
offset / int_input_width)).r;
|
||||
return image.Load(int3(offset % int_input_width,
|
||||
offset / int_input_width,
|
||||
0)).r;
|
||||
}
|
||||
|
||||
float4 PSPacked422_Reverse(VertInOut vert_in, int u_pos, int v_pos,
|
||||
|
Loading…
x
Reference in New Issue
Block a user