Skip to content

Clarify ShaderGraph variable renaming for Material API access#32

Open
0xTas wants to merge 1 commit intoFacepunch:masterfrom
0xTas:shadergraph-variable-renaming
Open

Clarify ShaderGraph variable renaming for Material API access#32
0xTas wants to merge 1 commit intoFacepunch:masterfrom
0xTas:shadergraph-variable-renaming

Conversation

@0xTas
Copy link
Copy Markdown

@0xTas 0xTas commented Apr 11, 2026

Adds a warning to the ShaderGraph Variables docs explaining that variable names can be changed during shader compilation. This caused me a lot of confusion when trying to access them via Material.Set() etc. since the name used in code did not match what was set and shown in ShaderGraph (e.g. "Intensity" → "g_fIntensity").

Also includes an example and points readers to the generated .shader file so they can find the correct compiled name for their variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant