2 unstable releases

0.5.0 Jan 9, 2022
0.1.0 Jan 8, 2022

#1051 in Graphics APIs

MIT license

1MB
572 lines

Material Designer

Material Designer

Design custom materials for Bevy.

  • Loads objects, materials from simple settings files.
  • Hot-reloading of shaders, textures, and other material/object settings.
  • Try out custom materials/shaders with different shapes/textures.

Screenshot

Showing all example objects: Terrain

Files for Camera/Objects/Materials

On start the camera and objects are loaded from:

  • assets/settings.camera
  • And all files in: assets/objects/*.obj

assets/settings.camera:

(
  fov_degrees: 90.0,
  translation: (3.0, 5.0, -8.0),
)

assets/objects/*.obj

(
  shape: Cube(2.0),
  translation: (0.0, 2.0, 0.0),
  material: (
    material_type: "materials/base_texture.material_type",
    resources: {
      "base_texture": Texture("branding/icon.png"),
      "base_color": Color(Rgba(red: 0.0, green: 1.0, blue: 0.0, alpha: 1.0)),
    }
  )
)

assets/materials/*.material_type

(
  name: "BaseTexture",
  pipeline: (
    vertex: "shaders/base_texture.vert",
    fragment: Some("shaders/base_texture.frag"),
  ),
  resource_types: {
    "base_texture": Texture,
    "base_color": Color,
  }
)

Dependencies

~20–29MB
~480K SLoC