Vixen
dd8b0a81
csharp
public static class MaterialBake

Turns a graph's outputs into the files and the material a project can read.

Read the guide page for this →

Remarks

docs/plan/48 § D11, and the seam is a picture rather than a plan. Nothing here knows about TexturePlan, a device or a queue: a bake evaluates the graph, reads its outputs back as bitmaps, and hands them to Encode. That is what lets every decision that can be wrong — which channel roughness goes in, what an absent channel holds, which size crosses into a container, which block format each map ships in — be proved against arrays a test wrote by hand, with no adapter and no disk.

⚠ Two write paths, and they differ in when rather than in what. Up to PortableLimit a map is a PNG whose sidecar names the mips and the block format, and TextureImporter applies both at build time. Above it the same mip chain and the same block format are encoded here, into a KTX2 the importer passes straight through. One table — CompressionOf — drives both, so a 2048 bake and a 4096 bake of one graph do not ship in different formats.

Methods (4)

Used by (10)

  • BakedMaterialImageTestsVixen.Graphics.Golden.Tests
  • BakedMaterialFileTestsVixen.Editor.AssetEditors.Tests
  • MaterialBakeAssetTestsVixen.Editor.Assets.Tests
  • MaterialBakeParallaxVixen.Editor.Assets
  • MaterialBakeRouteVixen.Editor.Texturing
  • MaterialBakeTestsVixen.Editor.Assets.Tests
  • MaterialSplatTestsVixen.Editor.Assets.Tests
  • ProjectMaterialBakerVixen.Editor.Assets
  • TextureGraphRunnerVixen.Cli
  • TextureRunnerVixen.Cli