GPUFramebuffer: Fix wrong stencil clearing
This commit is contained in:
parent
d63c181887
commit
32e57fe4e7
|
@ -198,7 +198,7 @@ static void eevee_draw_background(void *vedata)
|
|||
while (loop_len--) {
|
||||
float clear_col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
float clear_depth = 1.0f;
|
||||
uint clear_stencil = 0xFF;
|
||||
uint clear_stencil = 0x0;
|
||||
uint primes[3] = {2, 3, 7};
|
||||
double offset[3] = {0.0, 0.0, 0.0};
|
||||
double r[3];
|
||||
|
|
|
@ -466,7 +466,7 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl
|
|||
while (render_samples < tot_sample && !RE_engine_test_break(engine)) {
|
||||
float clear_col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
float clear_depth = 1.0f;
|
||||
uint clear_stencil = 0xFF;
|
||||
uint clear_stencil = 0x00;
|
||||
uint primes[3] = {2, 3, 7};
|
||||
double offset[3] = {0.0, 0.0, 0.0};
|
||||
double r[3];
|
||||
|
|
|
@ -861,7 +861,7 @@ void workbench_deferred_draw_background(WORKBENCH_Data *vedata)
|
|||
WORKBENCH_PrivateData *wpd = stl->g_data;
|
||||
const float clear_depth = 1.0f;
|
||||
const float clear_color[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
uint clear_stencil = 0xFF;
|
||||
uint clear_stencil = 0x00;
|
||||
|
||||
DRW_stats_group_start("Clear Background");
|
||||
GPU_framebuffer_bind(fbl->prepass_fb);
|
||||
|
|
|
@ -500,7 +500,8 @@ void GPU_framebuffer_clear(
|
|||
glClearDepth(clear_depth);
|
||||
}
|
||||
if (buffers & GPU_STENCIL_BIT) {
|
||||
glStencilMask(clear_stencil);
|
||||
glStencilMask(0xFF);
|
||||
glClearStencil(clear_stencil);
|
||||
}
|
||||
|
||||
GLbitfield mask = convert_buffer_bits_to_gl(buffers);
|
||||
|
|
Loading…
Reference in New Issue