Cull front faces of flames(normals are backwards).
This commit is contained in:
parent
1dad2f589f
commit
8c1369ad2e
@ -197,11 +197,18 @@ void Graphics::render(double time)
|
||||
// render the level
|
||||
level->render(lightingShader, true, &lightingViewProjectionMatrix, &shadowVPs);
|
||||
|
||||
// cull faces to get consistent color while using alpha
|
||||
// cull front faces because normals are on the wrong side
|
||||
glEnable(GL_CULL_FACE);
|
||||
glCullFace(GL_FRONT);
|
||||
|
||||
// draw flames on top
|
||||
flameShader->use();
|
||||
flameShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix);
|
||||
flameShader->setUniform("time", (float) time);
|
||||
flame_positions->render();
|
||||
|
||||
glDisable(GL_CULL_FACE);
|
||||
}
|
||||
|
||||
bool Graphics::compareLightDistances(Light a, Light b) {
|
||||
|
Loading…
Reference in New Issue
Block a user