Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Asset Material

Rewlion edited this page May 15, 2024 · 1 revision

Every model assets has a predefined material that is described in the engine data config.
It describes a TFX technique and channel attributes that will be set during material usage.

texture
{
  bin:t = "bin/assets/damaged_helmet/albedo.ktx"
  name:t = "damaged_helmet.albedo"
}

static_mesh
{
  bin:t = "bin/assets/damaged_helmet/DamagedHelmet.gltf"
  name:t = "damaged_helmet"
}

model_asset
{
  name:t = "damaged_helmet"
  mesh:t = "damaged_helmet"

  material @("SceneOpaque")
  {
    "albedo":t = "damaged_helmet.albedo" @("texture")
    someFloatParam:f = 0.1
  }
}

SceneOpaque - TFX Technique to be activated
@("texture") - texture to be gathered from the asset storage and set via tfx::set_channel
Every POD type like 'someFloatParam' is just a param for the cbuffer that will be set via tfx::set_channel

Clone this wiki locally