Unity RenderTexture appears black or displays abnormally

       In the PC package under the DX11 environment, it is found that the character model displayed on the screen by RenderTexture is black, which is normal in the OpenGL environment, and it is also normal to view the texture resources in RenderTexture. The ColorFormat of RenderTexture uses the default R8G8A8_SRGB. This is no problem on OpenGL, but it will have problems on DX. Change it to B5G6R5_UNORM_PACK16 (color rendering may be lost, and the display is abnormal on some graphics cards, such as GTX750) or B10G11R11_UFLOAT_PACK32 to display normally .

      The real machine test should report:

      RenderTexture.Create failed: format unsupported

      It is recommended to use the following method to detect when using RenderTexture:

SystemInfo.IsFormatSupported(Experimental.Rendering.GraphicsFormat, Experimental.Rendering.FormatUsage)

Guess you like

Origin blog.csdn.net/lips264/article/details/126030149