PierreDubosq / Game-of-life

A simple game of life with the Raylib
MIT License
0 stars 0 forks source link

Use shader #3

Open PierreDubosq opened 2 months ago

PierreDubosq commented 2 months ago

Ah right. Well for a game of life shader you might need to recycle the texture, that is, you write to the texture with the shader, but then you feed the texture back to the shader for the next iteration. If that makes sense. It's tricky, but possible. There are GOL shaders on shadertoy you can look at.

@Cotterzz on Raylib's Discord (https://discord.com/channels/426912293134270465/1233544255931154502/1233682217620733982)

Cotterzz commented 2 months ago

My falling sand shader does this: https://github.com/Cotterzz/Raylib/tree/master/examples/sand