tgjones / HlslTools

A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
http://timjones.io/blog/archive/2016/04/25/hlsl-tools-for-visual-studio-v1.0-released
Other
568 stars 98 forks source link

Extract HLSL Preprocessor Definitions / Additional Include Directories from Visual C++ property pages #22

Open Chaosmeister opened 8 years ago

Chaosmeister commented 8 years ago

Hey, I'm now creating the issue here, since VSGallery does not notify me on your answers.

Our directorystructure looks like this: image

If I now include a Pixelshader from within another Pixelshader - everything works fine. image

Includes from other directories (SpecularLighting.hlsli is in the folder "Globals") are shown as errors.

The Globals and BufferLayouts however are set as Addition Include Directories in in the Property Pages of the Shaderfile: image

So it compiles without a problem, but the hlsltools think it's an error.

best regards!

tgjones commented 8 years ago

Thanks for logging this here. This issue is related to #8 - I need to add a way to have project-specific settings, including additional include directories and macros.

Another option would be for HLSL Tools to access the values you set in the Property Pages - but that is specific to C++ projects, and doesn't apply to HLSL files in general - it might be worth doing, but shouldn't be the only option.

tgjones commented 8 years ago

Some info on reading C++ file properties: