Skip to content

Clarify ShaderGraph variable renaming for Material API access#32

Open
0xTas wants to merge 2 commits into
Facepunch:masterfrom
0xTas:shadergraph-variable-renaming
Open

Clarify ShaderGraph variable renaming for Material API access#32
0xTas wants to merge 2 commits into
Facepunch:masterfrom
0xTas:shadergraph-variable-renaming

Conversation

@0xTas

@0xTas 0xTas commented Apr 11, 2026

Copy link
Copy Markdown

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.

@handsomematt

Copy link
Copy Markdown
Member

I don't want to accept this because I feel like we should fix this.

@0xTas

0xTas commented Jun 3, 2026

Copy link
Copy Markdown
Author

Fair, I can open an issue on the engine repo if you'd like?

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.

2 participants