kurtkuehnert / bevy_terrain

A terrain rendering plugin for the bevy game engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

naga oil for composable shaders?

jmatsushita opened this issue · comments

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

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.