Roxxik / rusteezee

A minimal Minecraft clone
MIT License
1 stars 1 forks source link

Rewrite Shaders #21

Closed Roxxik closed 8 years ago

Roxxik commented 8 years ago

rewrite shaders, use geometry shader, rusteezee is all about rectangles. There are basically no other rectangles, so make them a primitive(some sort of geometryshader usage here)

there are just 6 values per rectangle: vec3 top_left, vec3 bottom_right.

If there happens to be more than one texture: use an texture array and just pass the index within each vertex.

In essence: let the gpu do more stuff and use less (expensive) api calls

EDIT: finished for

Roxxik commented 8 years ago

Not sure if this can work. Have to reevaluate that later. It seems like a performance tradeoff that can only help when using a few thousand/million tris

Roxxik commented 8 years ago

done in #33