segfaultdev / tree

tree
MIT License
19 stars 3 forks source link

Shaders #3

Open nushoin opened 2 years ago

nushoin commented 2 years ago

This is a cool little project!

Skimming through the code it seems that your render loop - especially the tick_<water, plant, tiles>() functions - could gain a nice performance boost if implemented as OpenGL/WebGL fragment shaders.

Just an idea.

segfaultdev commented 2 years ago

Sorry for not responding, I've been busy recently.

About the shaders, that's an amazing idea! I'm not yet at an stage where I care that much about speed as the game is still relatively light and able to keep up 30 FPS just fine, but I'll definitively do that in the future, thanks!