I’ve been messing around with some custom post processing shaders in URP 16.0.4. Made some base classes for RendererFeatures and RenderPasses so adding new post processing effects is as easy as a few lines of code, and all works well and good.
Issue is that whenever I disable antialiasing in the URP asset, my screen turns black.
Comparison here, first image: AA->2x, second picture: AA->Disabled. (it works on all antialiased settings but disabled)
I’ve narrowed it down using my shader’s frag function.
As you can see by the commented out lines of code, I’ve tried a few return values to see what happens.
Returning float4(1, 1, 1, 0) does in fact turn the screen white, so I know the issue wasn’t the alpha as it shows regardless of alpha, which I expected, but there was a thread I read discussing in an old version something to do with antialiasing setting pixels alpha to zero and appearing black.
I also try immediately returning the colour sampled from the screen, with an alpha of 1( just in case )
This returns black, only with antialiasing disabled. So this implies that with antialiasing disabled, the actual input texture “_BlitTexture” is blank and the shader recieves nothing from the screen.
The _BlitTexture is what’s handled in unity’s Blit.hlsl. The RenderPass and RenderFeatures are using the tutorials on Unity’s URP 16.0.4 documentation page for “How to perform a fullscreen Blit” and “How to create a custom Renderer Feature”.
This is only my shader testing project, but I’d eventually like to bring these base classes into a game I’m working on, and I don’t want to accept the answer of “just keep AA on” because that’s not a good programming mentality. I’d just like some insight as to why it’s happening.
I’m not tagging this as a bug because it’s likely something I just am not understanding.