RodZill4 / material-maker

A procedural textures authoring and 3D model painting tool based on the Godot game engine
MIT License
3.46k stars 217 forks source link

Support Bevy #626

Open tbillington opened 1 year ago

tbillington commented 1 year ago

Feature/enhancement description:

Support Bevy as an export target. Bevy is built on wgpu and uses wgsl for shaders.

Calinou commented 1 year ago

Does Bevy have a standard material resource format? If so, can you link to it?

tbillington commented 1 year ago

There's not a binary format yet. The definition is in rust source code and shaders are referenced either by asset path or included as strings in the source.

Here's an example of the standard Pbr material extracted into an external library and the shader it uses. And here's a much smaller example of a basic toon shading material.

This is the definition of the Material interface the code must implement.

RodZill4 commented 1 year ago

You can already create custom export targets (provided materials can be described as text and image files), creating a Bevy export should be pretty easy. Please don't hesitate to join the Discord server if you need help for this.