use flatshading for space and skip setting irrelevant vertex color

This commit is contained in:
veclavtalica 2025-01-13 09:18:51 +03:00
parent b6ca9bedb4
commit c694dfff82
2 changed files with 4 additions and 4 deletions

View File

@ -108,11 +108,11 @@ void finally_draw_billboard_batch(struct MeshBatch const *batch,
} }
struct ElementIndexedBillboard const payload = { struct ElementIndexedBillboard const payload = {
/* TODO: use the flat shading to not set two of the colors */ /* flat shading is assumed, so we can skip setting the duplicates */
.c0 = billboard.color, .c0 = billboard.color,
.c1 = billboard.color, // .c1 = billboard.color,
.c2 = billboard.color, .c2 = billboard.color,
.c3 = billboard.color, // .c3 = billboard.color,
.uv0 = uv0, .uv0 = uv0,
.uv1 = uv1, .uv1 = uv1,

View File

@ -48,7 +48,7 @@ void finally_use_space_pipeline(void) {
glNewList(list, GL_COMPILE); { glNewList(list, GL_COMPILE); {
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glShadeModel(GL_SMOOTH); glShadeModel(GL_FLAT);
if (GLAD_GL_ARB_depth_clamp) if (GLAD_GL_ARB_depth_clamp)
glDisable(GL_DEPTH_CLAMP); glDisable(GL_DEPTH_CLAMP);