don't write unused color to vertices, utilize flat shading for only 2 important edges

This commit is contained in:
veclav talica 2024-10-14 21:23:44 +03:00
parent f7a718003e
commit 446402c2e0

View File

@ -418,9 +418,9 @@ bool push_quad_payload_to_vertex_buffer_builder(struct QuadBatch batch,
/* equal for all (flat shaded) */ /* equal for all (flat shaded) */
.c0 = m_color_packed_from(color), .c0 = m_color_packed_from(color),
.c1 = m_color_packed_from(color), // .c1 = m_color_packed_from(color),
.c2 = m_color_packed_from(color), .c2 = m_color_packed_from(color),
.c3 = m_color_packed_from(color), // .c3 = m_color_packed_from(color),
}; };
return push_to_vertex_buffer_builder(builder, &buffer_element, sizeof buffer_element); return push_to_vertex_buffer_builder(builder, &buffer_element, sizeof buffer_element);
@ -449,9 +449,9 @@ bool push_quad_payload_to_vertex_buffer_builder(struct QuadBatch batch,
/* equal for all (flat shaded) */ /* equal for all (flat shaded) */
.c0 = m_color_packed_from(color), .c0 = m_color_packed_from(color),
.c1 = m_color_packed_from(color), // .c1 = m_color_packed_from(color),
.c2 = m_color_packed_from(color), .c2 = m_color_packed_from(color),
.c3 = m_color_packed_from(color), // .c3 = m_color_packed_from(color),
}; };
return push_to_vertex_buffer_builder(builder, &buffer_element, sizeof buffer_element); return push_to_vertex_buffer_builder(builder, &buffer_element, sizeof buffer_element);