2D viewport environments

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Benjamin-L
:warning: Old Version Published before Godot 3 was released.

I am trying to set the clear color and enable HDR on a render target viewport. I assume that I need to set an environment object for the viewport. I tried setting the world property of the viewport and the environment property of the world. I then modified the clear color on that environment but it didn’t seem to have an effect on the clear color of the viewport. What am I doing wrong?

Just to note, instead of using clear color, you can try using a TextureFrame/Sprite to color the background.

Bojidar Marinov | 2016-03-24 09:24

:bust_in_silhouette: Reply From: Alex\doc

try with this, it should address your issue:
Explanation of hdr in 2D

Thanks for the response. What I am trying to do is render a separate scene and multiply the root scene by the output of that viewport. The problem is that if the second scene goes above pure white, it is clipped. I think it might be just that viewport render targets are not stored as HDR, which would make this impossible. I did tried enabling HDR on a WorldEnvironment node like the link suggests and it doesn’t seem to affect the viewport with the render target.

Benjamin-L | 2016-03-24 17:32