|
@@ -921,13 +921,19 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
|
|
|
{
|
|
|
// regular forward for now
|
|
|
Vector<Color> c;
|
|
|
- c.push_back(clear_color.srgb_to_linear()); // our render buffer
|
|
|
- if (rb_data.is_valid()) {
|
|
|
- if (p_render_data->render_buffers->get_msaa_3d() != RS::VIEWPORT_MSAA_DISABLED) {
|
|
|
- c.push_back(clear_color.srgb_to_linear()); // our resolve buffer
|
|
|
+ {
|
|
|
+ Color cc = clear_color.srgb_to_linear();
|
|
|
+ if (rb_data.is_valid()) {
|
|
|
+ cc.a = 0; // For transparent viewport backgrounds.
|
|
|
}
|
|
|
- if (using_subpass_post_process) {
|
|
|
- c.push_back(Color()); // our 2D buffer we're copying into
|
|
|
+ c.push_back(cc); // Our render buffer.
|
|
|
+ if (rb_data.is_valid()) {
|
|
|
+ if (p_render_data->render_buffers->get_msaa_3d() != RS::VIEWPORT_MSAA_DISABLED) {
|
|
|
+ c.push_back(clear_color.srgb_to_linear()); // Our resolve buffer.
|
|
|
+ }
|
|
|
+ if (using_subpass_post_process) {
|
|
|
+ c.push_back(Color()); // Our 2D buffer we're copying into.
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|