Fix stencil test;

This commit is contained in:
bjorn 2022-09-12 17:58:21 -07:00
parent d8c23bacec
commit 68f3610d5e
1 changed files with 5 additions and 1 deletions

View File

@ -1248,7 +1248,11 @@ bool gpu_pipeline_init_graphics(gpu_pipeline* pipeline, gpu_pipeline_info* info)
.depthTestEnable = info->depth.test != GPU_COMPARE_NONE,
.depthWriteEnable = info->depth.write,
.depthCompareOp = compareOps[info->depth.test],
.stencilTestEnable = info->stencil.test != GPU_COMPARE_NONE,
.stencilTestEnable =
info->stencil.test != GPU_COMPARE_NONE ||
info->stencil.failOp != GPU_STENCIL_KEEP ||
info->stencil.passOp != GPU_STENCIL_KEEP ||
info->stencil.depthFailOp != GPU_STENCIL_KEEP,
.front = stencil,
.back = stencil
};