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

Local includes and extension settings per solution #108

Open
helviett opened this issue Oct 6, 2022 · 0 comments
Open

Local includes and extension settings per solution #108

helviett opened this issue Oct 6, 2022 · 0 comments

Comments

@helviett
Copy link

helviett commented Oct 6, 2022

Installed product versions

  • Visual Studio 2022 Community
  • Extension version 0.11.160

Description

In game engines there's always complex shader system with includes. I've found two issues that make it hard to use this awesome extension:

  • Extension compiles shader somewhere in the temp directory and sets working directory to temp directory so shader compiler doesn't see local includes
  • Extension settings are global which make it hard to use extension with multiple solutions because the only way to specify additional include directories is to pass them via compiler arguments.

Consider the following example: we have a game project which contains a game engine submodule which has a plugin\extension system. Game engine, game itself and engine extensions can have their own shaders. Game engine, game and extensions have their own solutions. I use relative paths starting woth $(SolutionDir). I have to provide external include directories paths for each solution (e.g. path to some engine global includes) and for each folder which contains shader includes (e.g. we usually have ShaderShared.h include file which cotains uniforms). That's a lot of arguments for compiler.

I suggest to set working directory to the directory where shader is located. That should solve the first issue.
Besides that I suggest to make extension settings per solution or at least to give a way to override settings on solution level.

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

No branches or pull requests

2 participants