Blitting from RenderTexture.active to another RenderTexture with a shader sampling a texture at specific UV values causes visual artifacts
Unity: Graphics Device Features
Fixed
2023.2.X
2023.1.X
2022.2.X
2021.3.X
Won't Fix
2022.1.X
2022.1 has reached end of life so the issue will be fixed in a newer version.
Before the fix, no console message was provided about graphics glitching. After the fix, the console window presents a new warning for the user
How to reproduce:
Open the user-attached project (BlitBug.zip)
In the “Project” panel open and edit the “TestShader” file
Modify line 49 by changing float2(dx, 0) to float2(-dx, 0)
In the Editor enter Play Mode
Switch to the Scene view and observer the “Render Texture Preview“ Game Object
Expected result: the Game Object’s texture is a single solid color
Actual result: the Game Object’s texture has three dark lines going vertically and one diagonal line (when using Vulkan API there are flickering dark squares too)