|
|
@@ -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
|