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
561 stars 97 forks source link

Support non-root virtual directory mappings #204

Closed pbbastian closed 1 year ago

pbbastian commented 3 years ago

Unity has a virtual file system for packages that supports include paths like this:

#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"

Internally, Packages/com.unity.render-pipelines.universal is mapped to the actual folder of the package, which could be in the PackageCache, embedded in the Packages folder, or mapped directly to any folder.

HLSL Tools supports virtual directory mappings, and these could be used to map the path to the correct folder. However, it requires the virtual directory to be a root path -- i.e. start with / -- which the Packages folder isn't.

zongsheng-zhao commented 2 years ago

I have created a fork to solve this issue. Now it's under pull request #232