Hello,
I have dumped way too many hours of my life into this, and at this point i can only assume that the system is bugged.
I am trying to write to the normal buffer in After Opaque depth and Normal (both the normal (RGB) and roughness (A). There are several issues with this in the current custom pass fullscreen implementation.
- alpha is stored in the alpha channel, so in my fullscreen shader, if i want to return a smooth value (0), nothing gets written for that pixel
- it seems the normal buffer gets completely messed up when trying to modify it.
Yes, I am using DecodeFromNormalBuffer and EncodeToNormalBuffer to properly pack the values.
As you can tell from the (very) messy screenshot attached, ive tried just about everything in the custom pass.
Even just decoding the normal buffer and encoding it and returning that value, without modifying the data, completely messes up the normal. (see shader code attached)
At this point i am about ready to completely give up on my idea, which sucks because according the the custom pass docs, i should be able to read/write the normal buffer in this custom pass injection point.
@antoinel_unity I have looked at your custom pass examples, and see your writing to the normal buffer using DrawRendererList, however my use case is writing to it using a fullscreen shader. I think you are one of the only people who might be able to help me with this.