1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 07:27:40 +00:00

3d::draw:: added shading

This commit is contained in:
Zeno Rogue
2019-04-07 03:08:43 +02:00
parent cc5f381d20
commit 36b4b60d46
3 changed files with 46 additions and 5 deletions

View File

@@ -1962,8 +1962,13 @@ namespace mapeditor {
usershapelayer& ds(us->d[i]);
hpcshape& sh(ds.sh);
if(sh.s != sh.e)
queuepolyat(mmscale(V, geom3::lev_to_factor(ds.zlevel)), sh, ds.color ? ds.color : color, prio);
if(sh.s != sh.e) {
auto& last = queuepolyat(mmscale(V, geom3::lev_to_factor(ds.zlevel)), sh, ds.color ? ds.color : color, prio);
if(DIM == 3) {
last.tinf = &user_triangles_texture;
last.offset_texture = ds.texture_offset;
}
}
}
}