libobs: Add DrawSrgbDecompress default technique
Useful when the texture does not support SRGB conversion on load.
This commit is contained in:
parent
05b507d900
commit
c9766d8e28
@ -62,6 +62,13 @@ float4 PSDrawNonlinearAlpha(VertInOut vert_in) : TARGET
|
||||
return rgba;
|
||||
}
|
||||
|
||||
float4 PSDrawSrgbDecompress(VertInOut vert_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(def_sampler, vert_in.uv);
|
||||
rgba.rgb = srgb_nonlinear_to_linear(rgba.rgb);
|
||||
return rgba;
|
||||
}
|
||||
|
||||
float4 PSDrawSrgbDecompressPremultiplied(VertInOut vert_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(def_sampler, vert_in.uv);
|
||||
@ -97,6 +104,15 @@ technique DrawNonlinearAlpha
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawSrgbDecompress
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(vert_in);
|
||||
pixel_shader = PSDrawSrgbDecompress(vert_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawSrgbDecompressPremultiplied
|
||||
{
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user