tbillington / bevy_toon_shader

Toon Shader for the bevy game engine
Apache License 2.0
98 stars 9 forks source link

Expose shader settings via a configuration resource #6

Open alice-i-cecile opened 1 year ago

alice-i-cecile commented 1 year ago

There are a few critical settings (number of bands and glossiness to start with) that are currently hard-coded. These should be exposed via a fully public configuration resource so users can quickly tweak these values without needing to modify the shader source code.

tbillington commented 1 year ago

Is a property on the material struct the best way to plumb that resource setting through to the shader?

So a change to the ToonShaderConfiguration resource would result in triggering a modification of all current ToonShaderMaterial materials ?

alice-i-cecile commented 1 year ago

I think you can probably extract the resource directly to the render world, which would let it be shared across all toon-shaded materials and reduce data duplication. Rendering folks will have better advice than me though.