mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
libobs: Fix shader fix not working on D3D11
Inc8d95005c1
, it was incorrect assumed that just because the fix worked on OpenGL, that the fix would also work on D3D11. Automated tests would be ideal here, although if there were automated tests, ironically, it wouldn't have picked this up, because we (read: I) made D3D11 fall back to OpenGL of D3D11 failed. Basically there is no one to blame but myself again. This time, we've removed the OpenGL fallback ina06d6893b9
(thank you Rodney), and additionally I properly tested on both rendering backends. (Lain note: I'm just going to go sit in the corner for a bit and ruminate after this)
This commit is contained in:
parent
a06d6893b9
commit
45e7334206
@ -31,14 +31,14 @@ float4 PSDrawBare(VertInOut vert_in) : TARGET
|
||||
float4 PSDrawAlphaDivide(VertInOut vert_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(def_sampler, vert_in.uv);
|
||||
rgba.rgb = (rgba.a > 0.) ? (rgba.rgb / rgba.a) : float3(0.);
|
||||
rgba.rgb = (rgba.a > 0.) ? (rgba.rgb / rgba.a) : float3(0., 0., 0.);
|
||||
return rgba;
|
||||
}
|
||||
|
||||
float4 PSDrawAlphaDivideTonemap(VertInOut vert_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(def_sampler, vert_in.uv);
|
||||
rgba.rgb = (rgba.a > 0.) ? (rgba.rgb / rgba.a) : float3(0.);
|
||||
rgba.rgb = (rgba.a > 0.) ? (rgba.rgb / rgba.a) : float3(0., 0., 0.);
|
||||
rgba.rgb = rec709_to_rec2020(rgba.rgb);
|
||||
rgba.rgb = reinhard(rgba.rgb);
|
||||
rgba.rgb = rec2020_to_rec709(rgba.rgb);
|
||||
@ -48,7 +48,7 @@ float4 PSDrawAlphaDivideTonemap(VertInOut vert_in) : TARGET
|
||||
float4 PSDrawAlphaDivideR10L(VertInOut vert_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(def_sampler, vert_in.uv);
|
||||
rgba.rgb = (rgba.a > 0.) ? (rgba.rgb / rgba.a) : float3(0.);
|
||||
rgba.rgb = (rgba.a > 0.) ? (rgba.rgb / rgba.a) : float3(0., 0., 0.);
|
||||
rgba.rgb *= multiplier;
|
||||
rgba.rgb = rec709_to_rec2020(rgba.rgb);
|
||||
rgba.rgb = linear_to_st2084(rgba.rgb);
|
||||
|
Loading…
Reference in New Issue
Block a user