Hey!
So I've been trying to have a simple on/off switch in the GUI for Luma Sharpen. Trying to understand how it all works, but I've never seen stuff like "half4".
So I need some help...

Whenever there's a
res=origcolor I can usually create an on and off switch by adding:
Code:
if (XXX==true) {
res = lerp ( blablabla );
}
if (XXX==false) {
res.rgb = origcolor.rgb;
}
But I don't know how to make this in Luma Sharpen shader...
Tried this:
Code:
// -- Combining the values to get the final sharpened pixel --
if (LumaSharpen==true) {
half4 done = ori + sharp; // Add the sharpening to the original. //Wait shouldn't I be adding it to luma and then add chroma?
}
if (LumaSharpen==false) {
half4 done = ori.rgb;
}
But the shader doens't load obviously... I'm still a noob at this so be gentle. ^^
Can it even be done with Luma Sharpen? If all else fails I'll use a #ifdef instead. But I'd rather have all in the GUI so...pls help!