RaptorShaderProfile
Chooses the shaders for RAPTOR's generated materials.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Tools that generate materials request a RaptorShaderSlot instead of a shader path. Each slot resolves to the first match of:
- Bakery's shader, by its meta GUID.
- 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.
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 RaptorShaderProfileFields
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.
| Parameter | Type | Description |
|---|---|---|
slot | RaptorShaderSlot | The shader slot. |
Returns: The file name.
BakeryGuid
public static string BakeryGuid(RaptorShaderSlot slot)Gets Bakery's meta GUID for the slot's shader.
| Parameter | Type | Description |
|---|---|---|
slot | RaptorShaderSlot | The shader slot. |
Returns: The GUID.
Get
public static Shader Get(RaptorShaderSlot slot)Gets the slot's shader, or null when nothing resolves.
| Parameter | Type | Description |
|---|---|---|
slot | RaptorShaderSlot | The shader slot. |
Returns: The shader, or null.
Resolve
public static RaptorShaderResolution Resolve(RaptorShaderSlot slot)Gets the slot's shader and how it was found.
| Parameter | Type | Description |
|---|---|---|
slot | RaptorShaderSlot | The shader slot. |
Returns: The shader and the step.
Related types
- RaptorShaderResolution: One slot's resolved shader and where it came from.
- RaptorShaderSlot: The shader slots RAPTOR generates materials for.