Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve local includes #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adam-wolski
Copy link
Contributor

Hey, me again 😄

I propose small improvement to includes parsing that allows working with paths that IDEs have less problems with.

When using IDEs like Rider for developing shaders they often have problems with finding includes when included as virtual paths.

See for example https://youtrack.jetbrains.com/issue/RIDER-69615

This can be often worked around when working with global shaders by using relative paths to virtual shader location.

This cannot be done same way for code generated with HLSLMaterial.

This change adds fallback mechanism when we find that include path isn't real virtual path.
We try to check if this path is relative path to our hlsl file and if it is we try to find it in virtual mappings.

When using IDEs like Rider for developing shaders they often have
problems with finding includes when included as virtual paths.

See for example https://youtrack.jetbrains.com/issue/RIDER-69615

This can be often worked around when working with global shaders
by using relative paths to virtual shader location.

This cannot be done same way for code generated with HLSLMaterial.

This change adds fallback mechanism when we find that include path
isn't real virtual path.
We try to check if this path is relative path to our hlsl file and
if it is we try to find it in virtual mappings.
@Phyronnaz
Copy link
Owner

The change is sound, I'll try to merge it soon :)

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