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
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
- Profiler - Taking you to the wrong section when using 'show'
- Draw Renderers custom pass doesn't work with SSGI
- WebCamTexture does not set the requested resolution when used in WebGL
- Editor default Stylesheet/Matching Selector buttons in Debugger don't do anything
- Graphics.DrawMeshNow stops rendering Render Texture after a few frames when viewed in the Player
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.