1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-16 01:59:44 +00:00

2D3D:: wall shadows

This commit is contained in:
Zeno Rogue
2019-05-13 13:39:43 +02:00
parent 8858b137b5
commit 740cc5fbb6
4 changed files with 31 additions and 1 deletions

View File

@@ -672,6 +672,7 @@ void dqi_poly::gldraw() {
if(flags & POLY_TRIANGLES) {
glhr::color2(color);
glhr::set_depthtest(model_needs_depth() && prio < PPR::SUPERLINE);
glhr::set_depthwrite(model_needs_depth() && prio != PPR::TRANSPARENT_SHADOW);
glDrawArrays(GL_TRIANGLES, ioffset, cnt);
}
else {
@@ -687,6 +688,7 @@ void dqi_poly::gldraw() {
current_display->set_mask(ed);
glhr::color2(color);
glhr::set_depthtest(model_needs_depth() && prio < PPR::SUPERLINE);
glhr::set_depthwrite(model_needs_depth() && prio != PPR::TRANSPARENT_SHADOW);
if(flags & (POLY_INVERSE | POLY_FORCE_INVERTED)) {
glStencilOp( GL_ZERO, GL_ZERO, GL_ZERO);