danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
257 stars 28 forks source link

Local includes and extension settings per solution #108

Open helviett opened 1 year ago

helviett commented 1 year ago

Installed product versions

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:

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.