Skip to content

Conversation

@trie94
Copy link
Contributor

@trie94 trie94 commented Oct 28, 2025

Move resolving #includes from MaterialBuilder to MaterialCompiler before parsing the material.

Some details:

  • resolving #includes was happening after parsing, now moving before parsing. this is because we could offload this resolution at build time for RuntimeMaterialCompiler
  • filamat::resolveIncludes and include related classes are moved to MaterialCompiler. Now MaterialBuilder always assumes the input is already inlined.
  • resolveIncludes used to have an assumption where the given text was already a shader block. this assumption is now broken so it finds the line offset internally. thus the line offset field is removed from IncludeResult.

Follow up (in a separate PR):
We will add a resolveIncludes flag in the CommandlineConfig and allows matc to return unresolved mat to resolved mat.

@pixelflinger pixelflinger requested review from bejado, pixelflinger, poweifeng and z3moon and removed request for poweifeng October 28, 2025 17:43
@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Oct 28, 2025
@trie94 trie94 requested a review from z3moon October 28, 2025 21:01
…fore parsing the material.

- resolving #includes was happening after parsing, now moving before parsing.
this is because we could offload this resolution at build time for RuntimeMaterialCompiler
- filamat::resolveIncludes used to have an assumption where the given text was already
a shader block. this assumption is now broken so it finds the line offset internally.
thus the line offset field is removed from IncludeResult.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Issue/PR does not affect clients

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants