Search Issue Tracker
Won't Fix
Votes
1
Found in
5.5.0p1
Issue ID
874955
Regression
No
Camera always clears framebuffer on WebGL
Reproduction Steps:
1- Download the project and open "test" scene.
2- Make sure main camera's Clear Flags option is set to "Don't Clear" or "Depth only".
3- Play scene in editor, move cube with left/right arrow keys.
4- Observe expected results.
5- Build and run for WebGL.
Expected Result: Current scene should be rendered on top of previous one. (As seen at 4th step.)
Observed Result: Camera always clears both color and depth buffers.
Reproduced with: 5.6.0b6, 5.2.5f1
Comments (4)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Error in Shader Graph Assets/Samples/Shader Graph/17.1.0/Production Ready Shaders/Lit/URPLit.shadergraph: Graph is generating too many variants…” error is thrown after importing Shader Graph Samples
- ComputeShader cannot access the depth element of RenderTexture targeted by an HDR camera
- Search in the Console window highlights wrong text when text contains HTML attributes
- Particle System doesn't always play when ParticleSystem.Play() is called
- Build Profiles: The vertical and horizontal window lines are different colors and this is not consistent with the other engine windows
Emrys95
Jun 19, 2020 12:37
Is there any other workaround to this?
UnityLoader.instantiate("gameContainer", "Build/name.json", {onProgress: UnityProgress,
Module: {
"webglContextAttributes": {"preserveDrawingBuffer": true},
}});
doesn't really work.
Marco-Trivellato
Jan 04, 2019 12:40
This is the default webgl behaviour. See https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2 for more information.
If you really want to preserve the content of the drawing buffer, you can set webglContextAttributes.preserveDrawingBuffer to true, at instantiation time:
UnityLoader.instantiate("gameContainer", "Build/name.json", {onProgress: UnityProgress,
Module: {
"webglContextAttributes": {"preserveDrawingBuffer": true},
}});
Hope that helps.
kevin-masson
Dec 19, 2018 14:25
Hey, what can we do to bypass this issue ?
russellsavage
Aug 28, 2017 17:00
Why will this not be fixed? Could you please give an explanation. This is keeping us from upgrading to the newest versions of Unity.