Combined depth test and depth write modes into PipelineInfo.rasterMode.

This commit is contained in:
2022-07-02 21:01:02 -07:00
parent d292c86b6e
commit 8db6a4313f
12 changed files with 91 additions and 107 deletions

View File

@@ -142,14 +142,6 @@ void KRAmbientZone::render(RenderInfo& ri)
KRPipeline *pPipeline = getContext().getPipelineManager()->getPipeline(*ri.surface, info);
if(getContext().getPipelineManager()->selectPipeline(*ri.surface, *ri.camera, pPipeline, ri.viewport, sphereModelMatrix, &ri.point_lights, &ri.directional_lights, &ri.spot_lights, 0, ri.renderPass, Vector3::Zero(), 0.0f, Vector4::Zero())) {
// Disable z-buffer write
GLDEBUG(glDepthMask(GL_FALSE));
// Enable z-buffer test
GLDEBUG(glEnable(GL_DEPTH_TEST));
GLDEBUG(glDepthFunc(GL_LEQUAL));
GLDEBUG(glDepthRangef(0.0, 1.0));
std::vector<KRMesh *> sphereModels = getContext().getMeshManager()->getModel("__sphere");
if(sphereModels.size()) {
for(int i=0; i < sphereModels[0]->getSubmeshCount(); i++) {