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
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
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.