32 float4 color_override(0.0f, 0.0f, 0.0f, 0.0f);
35 if (
state.is_viewport_image_render && !
state.draw_background) {
37 color_override[3] = 1.0f;
39 else if (
state.is_space_image()) {
42 else if (
state.is_space_node()) {
46 else if (!
state.draw_background) {
79 bg_ps_.framebuffer_set(&framebuffer_ref_);
81 if ((
state.clipping_plane_count != 0) && (
state.rv3d) && (
state.rv3d->clipbb)) {
85 bg_ps_.shader_set(res.shaders->background_clip_bound.get());
86 bg_ps_.push_constant(
"ucolor", res.theme.colors.clipping_border);
87 bg_ps_.push_constant(
"boundbox", bbox.
data(), 8);
88 bg_ps_.draw(res.shapes.cube_solid.get());
91 bg_ps_.state_set(pass_state);
92 bg_ps_.shader_set(res.shaders->background_fill.get());
95 bg_ps_.bind_texture(
"color_buffer", &res.color_render_tx);
96 bg_ps_.bind_texture(
"depth_buffer", &res.depth_tx);
97 bg_ps_.push_constant(
"color_override", color_override);
98 bg_ps_.push_constant(
"bg_type", background_type);