kurtkuehnert / bevy_terrain

A terrain rendering plugin for the bevy game engine.
Apache License 2.0
169 stars 19 forks source link

naga oil for composable shaders? #14

Open jmatsushita opened 4 months ago

jmatsushita commented 4 months ago

Hi there,

Amazing work with this plugin 👏 ! I've been wondering if https://github.com/bevyengine/naga_oil could be useful to make bevy_terrain's shaders more composable, and the library overall more modular?

I'm curious about your thoughts on the matter :)

Cheers,

Jun

kurtkuehnert commented 4 months ago

Hi,

I have tried making the shaders more composable already. Since I have not settled for a final API, I have not invested too much into reusability.

For now, you can overwrite the default fragment and vertex shaders, similar to the spherical example.

I have put most bevy terrain logic in the functions.wgsl and attachments.wgsl files. You can simply import them and compose them together.