ethereumdegen / bevy_mesh_terrain

MIT License
36 stars 5 forks source link

optionally provide more versatile tile-map functionality #6

Open mattdm opened 9 months ago

mattdm commented 9 months ago

I see in https://github.com/ethereumdegen/bevy_mesh_terrain/blob/85eccf1767b75af17abb8f2c4fd50ce6def526a3/assets/shaders/terrain.wgsl#L4 the link to bevy_terrain's advanced shader, which uses a function to find the individual tile texture. The RGBA hack this plugin uses currently is very clever, but it'd be nice to have some more versatile options:

What do you think?

mattdm commented 9 months ago

If you're interested, this looks like something I could experiment with....

mattdm commented 9 months ago

Oh, here's another one, keeping the "splat map" idea: 5 tile options, with the fifth an implied "background layer". That is, 1-(R+B+G+A).

ethereumdegen commented 5 months ago

I experimented with this and figured out how to support 255 textures ! check it out and let me know what you think .

mattdm commented 4 months ago

Cool — I've been busy with other things but will look when I get a chance.