HlslTools icon indicating copy to clipboard operation
HlslTools copied to clipboard

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

Open Chaosmeister opened this issue 9 years ago • 2 comments

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!

Chaosmeister avatar Dec 03 '15 09:12 Chaosmeister

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 avatar Dec 07 '15 14:12 tgjones

Some info on reading C++ file properties:

  • https://blogs.msdn.microsoft.com/visualstudio/2010/01/14/how-to-readwrite-the-new-visual-c-project-properties/
  • https://msdn.microsoft.com/en-us/library/dn655034.aspx

tgjones avatar Feb 29 '16 11:02 tgjones