Use gl_FrontFacing to determine mirrored surface side, enable clipping (Refs #190)
This commit is contained in:
parent
becdc7c9dc
commit
876f5714eb
7 changed files with 18 additions and 23 deletions
|
|
@ -789,14 +789,15 @@ public:
|
|||
|
||||
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipelines.debug));
|
||||
|
||||
// Flip culling
|
||||
rasterizationState.cullMode = VK_CULL_MODE_BACK_BIT;
|
||||
|
||||
// Mirror
|
||||
shaderStages[0] = loadShader(getAssetPath() + "shaders/offscreen/mirror.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
|
||||
shaderStages[1] = loadShader(getAssetPath() + "shaders/offscreen/mirror.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
rasterizationState.cullMode = VK_CULL_MODE_NONE;
|
||||
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipelines.mirror));
|
||||
|
||||
// Flip culling
|
||||
rasterizationState.cullMode = VK_CULL_MODE_BACK_BIT;
|
||||
|
||||
// Phong shading pipelines
|
||||
pipelineCreateInfo.layout = pipelineLayouts.shaded;
|
||||
// Scene
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue