Vixen
dd8b0a81
csharp
public static class ShaderGraphSources

Every shader graph in a project, as the Raven a shader compilation is given.

Read the guide page for this →

Remarks

The step that turns "the graph emits text nobody reads" into a shader a material can name. Both compilations in this repository — the editor's EditorEffects and the build's ShaderBuildRunner — were assembled from *.rvn found on disk under Assets/, so a graph that emitted perfect Raven was invisible to both. This is what they enumerate as well.

⚠ Generated in memory and never written to disk, which is a decision and not a shortcut. A generated .rvn beside its graph would acquire a .meta, an address and a place in the asset browser; it would be committed by somebody, edited by somebody else, and then silently overwritten by the next import. RavenEffectCompiler has taken in-memory sources since the graph previews needed them, and its own remarks say why: a shader that was never a file should not become one.

⚠ A graph that does not compile contributes nothing and is not an exception. One broken graph must not fail every material in the project, which is what adding unparseable text to a shared compilation does — RavenEffectCompiler's constructor throws on a source that will not parse, and the editor's refusal message is then about the whole library. The diagnostics come back on the record instead, for the caller to report against the file that caused them.

Only surface graphs. A standalone graph is a whole shader with its own stages and its own worldViewProjection; putting one into the same compilation as the library is harmless but pointless, since nothing can name it as a material. It is skipped rather than reported, because a standalone graph is a legitimate thing to have — it is what a preview thumbnail is, and what an author hands to raven compile.

Fields and properties (1)

  • public const string Extension

    What a shader graph is written as.

Methods (3)

Used by (5)

  • EditorEffectsVixen.Editor.App
  • MaterialDocumentVixen.Editor.AssetEditors
  • ShaderBuildRunnerVixen.Cli
  • ShaderGraphImporterVixen.Editor.Assets
  • ShaderGraphSourceTestsVixen.Editor.Assets.Tests