I've got a HLSL file in my Assets/Graphics/Shaders/Includes/ directory and I'm trying to get the HDRP light values from LightDefinition.cs.hlsl.
This file is located within the HDRP package, and the usual way to reference any package includes according to the documentation is the following:
----------
**\#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs.hlsl"**
However, this throws an error in VS, claiming that the directory could not be found. I've checked the names are all correct, and the file does indeed exist. However, the routing from Packages/ to the packagecache doesn't seem to function.
----------
**\#include "../../../../Library/PackageCache/com.unity.render-pipelines.high-definition@7.1.5/Runtime/Lighting/LightDefinition.cs.hlsl"**
This does however work, but then all the includes and types within these files (eg. 'real' type) throw their own compiler errors. Additionally, it's a very fragile reference being both inside a cache and version specific.
----------
If anyone has either:
A) A better way to access the HDRP light values for a custom light solution
or
B) A way to fix the includes
I'd be incredibly interested to hear.
Thanks!
↧