Custom shader sRGB conversion and Normal+Height+Mesh map from shader
1. Cusotm linear to sRGB conversion
In the documentation it states that:
You can override the automatic linear -> sRGB conversion in the viewport by putting this line in your custom shader:
#define DISABLE_FRAMEBUFFER_SRGB_CONVERSION
But using this flag inside my shader doesn't seem to work. Is this flag still supposed to work?
2. How is the Normal+Height+Mesh computed?
I know that I need to use the normalBlendOriented function to blend 2 normal maps and also normalFromHeight to get the height normal map.
I managed to get to a pretty close implementation but there is a problem if the normal channel is just partially defined (so checking is_set is not enough). I kind of solved this issue using mix and the length of the channel_normal to lerp between (texture_normal+height_normal) and channel_normal.
If there is the exact implementation somewhere it would be very helpful.
