- Home /
The alpha value in the RenderTexture are not the same in Editor mode and Build mode.
As the tiles implies, I have prepared several sample pictures to explain.
Unity version is 2019.2.2f1 LWRP.
(I am not 100% certain, but, I believe the problem is also occurring on Unity version 2019.1.0f2)
Green Cube picture taken by RenderCamera, then attached to the Quad
Green Cube picture taken by RenderCamera, then attached to the Quad (with only the Alpha values)
RenderTexture Settings
RenderTexture Camera Settings
Judging from these pictures, the Alpha Values applied to RenderTexture have either a +1value added to them, or those Values are missing.
The price of .
Thank you.
Answer by Mouton · Sep 27, 2019 at 09:43 AM
You are certainly using different graphic settings in Editor and build mode. Try to change the graphic settings in the Editor to be the same than the one inside your Build.
More information on how-to change graphic settings here: https://docs.unity3d.com/Manual/class-GraphicsSettings.html
Thank you for your reply.
When I checked it, I found no difference.
Answer by hh_sqex · Sep 30, 2019 at 04:04 AM
After looking into the Results, it seems that the problem can be solved be doing either of,
"Un-checking General->OpaeueTexture for LightweightRenderPipelineAsset"
or
“Turn off the OpaqueTexture in the RenderTexture camera”
However, even after doing either of the 2 solutions stated above, A problem will still occur if, "Setting the LightweightRenderPipelineAsset RenderType to Custom and adding a path that does nothing"
I checked the source code,
Packages\com.unity.render-pipelines.lightweight@6.9.1\Runtime ForwardRenderer.cs Line118
// TODO: There's an issue in multiview and depth copy pass. Atm forcing a depth prepass on XR until
// we have a proper fix.
if (renderingData.cameraData.isStereoEnabled && renderingData.cameraData.requiresDepthTexture)
requiresDepthPrepass = true;
bool createColorTexture = RequiresIntermediateColorTexture(ref renderingData, cameraTargetDescriptor)
|| rendererFeatures.Count != 0;
It seems to be a problem when looking at the number of custom RenderFeatures.
By commenting out here and "Turn off the OpaqueTexture in the RenderTexture camera"
I was able to resolve it for now, but I would like a regular fix.
Thank you.
Your answer
Follow this Question
Related Questions
Complex Depth Shader 0 Answers
Graphics.DrawTexture vs GUI.DrawTexture vs Graphics.Blit 0 Answers
RenderTexture Painting - color blending issues 1 Answer
OnRenderImage does not work in HDRP 0 Answers