vvvv / VL.StandardLibs

A collection of standard libraries for vvvv including VL.Stride, VL.Skia, VL.ImGui, msgpack.org[VL]
https://visualprogramming.net
GNU Lesser General Public License v3.0
36 stars 14 forks source link

Support DontConvertToLinearOnRead & DontConvertToSRgbOnOnWrite in DrawFX #89

Open gregsn opened 2 years ago

gregsn commented 2 years ago

I found a case where I had to convert a shader that was supposed to be used with the device in gamma color space. To make it work as expected I had to surround most of the pixel shader code with these calls:

    float4 col = Source.SampleLevel(Sampler0, tc, 0);
    col = ColorUtilityTemp.LinearToSRgb(col);

... col = ColorUtilityTemp.SRgbToLinear(col); return col;

What this does is that the pixel shader

It works but is quite an overhead.