Get RAPTOR

RaptorShaderProfile

Chooses the shaders for RAPTOR's generated materials.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

Tools that generate materials request a RaptorShaderSlot instead of a shader path. Each slot resolves to the first match of:

  1. Bakery's shader, by its meta GUID.
  2. Bakery's shader, by its exact file name anywhere in the project. This finds a copy whose GUID has changed, such as a re-imported one.
  3. Universal Render Pipeline/Lit. For Glass and Cutout, the caller then sets the transparent or alpha-clip state (RaptorShaderResolution.IsFallback).

Results are cached until the project changes. Resolving does not create, import, save or log anything.

public static class RaptorShaderProfile

Fields

UrpLitShaderName

public const string UrpLitShaderName;

The URP shader every slot falls back to.

Properties

Cutout

public static Shader Cutout { get; }

The alpha-tested shader. For the URP fallback, see RaptorShaderResolution.IsFallback.

Glass

public static Shader Glass { get; }

The glass shader. For the URP fallback, see RaptorShaderResolution.IsFallback.

HotspotSheet

public static Shader HotspotSheet { get; }

The hotspot sheet shader.

Lit

public static Shader Lit { get; }

The opaque lit shader.

LitSpec

public static Shader LitSpec { get; }

The opaque lit shader, specular workflow.

Methods

BakeryFileName

public static string BakeryFileName(RaptorShaderSlot slot)

Gets Bakery's file name for the slot's shader, without extension.

ParameterTypeDescription
slotRaptorShaderSlotThe shader slot.

Returns: The file name.

BakeryGuid

public static string BakeryGuid(RaptorShaderSlot slot)

Gets Bakery's meta GUID for the slot's shader.

ParameterTypeDescription
slotRaptorShaderSlotThe shader slot.

Returns: The GUID.

Get

public static Shader Get(RaptorShaderSlot slot)

Gets the slot's shader, or null when nothing resolves.

ParameterTypeDescription
slotRaptorShaderSlotThe shader slot.

Returns: The shader, or null.

Resolve

public static RaptorShaderResolution Resolve(RaptorShaderSlot slot)

Gets the slot's shader and how it was found.

ParameterTypeDescription
slotRaptorShaderSlotThe shader slot.

Returns: The shader and the step.