The background of Unity's URP is opaque after enabling PostProcessing

The camera needs to enable Post  Processing . The post-processing effect is only added to the model. The problem is that the background is opaque after it is turned on.

In a post I found on the Internet, the Unity test of Unity2020.3 version is valid.

Ask a question about post processing of a model camera with Post Processing enabled -- UWA Q&A | Interactive Q&A Community for Game Developers | Yuhu Technology (uwa4d.com)

The following is a detailed step-by-step explanation of the first answer:

1. Open the Frame Dubug window
2. Click Enable in the upper left corner of Frame Debug
3. Select the rendered Camera
4. Click UberPost.Shader on the right (find the shader source file)
5. Project will jump out of the location of the Shader file, you can also omit the above Steps, directly search for 6.UberPost.Shader in the Project view
 

After opening, pull to the bottom, find the following code and comment it out

return half4(color, 1.0);

Add a new line of code to get the alpha value of the original uv

return half4(color, SAMPLE_TEXTURE2D_X(_SourceTex, sampler_LinearClamp, uv).a);

Guess you like

Origin blog.csdn.net/qq_35385242/article/details/127905361