keijiro / KlakSpout

Spout plugin for Unity
The Unlicense
651 stars 97 forks source link

Feature Suggestion: Make GammaToLinearSpace Conversion Optional in the Shader #85

Open strangerattractor opened 2 years ago

strangerattractor commented 2 years ago

Reason being:

I tried to spout Positional Data from TouchDesigner to Unity. GammaToLinearSpace Conversion in your shader leads to this behaviour:

https://streamable.com/kjz7si

Bypassing Line 52 in your shader fixes the issue for me: `

ifndef UNITY_COLORSPACE_GAMMA

c.rgb = GammaToLinearSpace(c.rgb);

endif`

here is a proof of concept video: https://streamable.com/goojr6 (I only bypassed the gamma correction directly in the shadercode. Nothing else. Very messy)

Thanks for your awesome work!

strangerattractor commented 2 years ago

Hi Keijiro,

saw that you changed this into "question". Am I missing something? I figured out that I can also switch Unity to "Gamma Mode", which also changes the behavior of the shader, and makes it work. But that in turn "breaks" the standard HDRP-Settings.

I'm thankful for any guidance you can give on this.