[vulkan] Use front-face culling for shadow passes

This clears up the shadow acne, but does cause problems with lights
inside models. However, this can be fixed by setting the models to not
cast shadows.
This commit is contained in:
Bill Currie 2023-08-05 13:22:29 +09:00
parent 15d7222ebb
commit f77ad8a676

View file

@ -118,6 +118,15 @@ properties = {
depthBiasEnable = false;
lineWidth = 1;
};
cw_cull_front = {
depthClampEnable = false;
rasterizerDiscardEnable = false;
polygonMode = fill;
cullMode = front;
frontFace = clockwise;
depthBiasEnable = false;
lineWidth = 1;
};
counter_cw_cull_back = {
depthClampEnable = false;
rasterizerDiscardEnable = false;
@ -1918,7 +1927,7 @@ renderpasses = {
base_pipeline = {
@inherit = $pipeline_base;
depthStencil = $depth_test_and_write;
rasterization = $cw_cull_back;
rasterization = $cw_cull_front;
};
pipelines = {
bsp:shadow = {