When I included a cginc in a shader, I used to supply the position relative to the Assets folder.
#include "Assets/WaterSim/Shaders/HeightmapSurface.cginc"
Which worked fine, until I switched to Unity 4, where compiling for DirectX 11 resulted in these warnings:
Shader warning in 'WaterSimulation/ForceErosion': Program 'vert', failed to open source file: 'Assets/WaterSim/Shaders/HeightmapSurface.cginc' (compiling for d3d11) at line 59
Shader warning in 'WaterSimulation/ForceErosion': Program 'vert', failed to open source file: 'Assets/WaterSim/Shaders/HeightmapSurface.cginc' (compiling for d3d11_9x) at line 59
Using paths that are relative to the shader file still works, so I’m using that instead:
#include "../HeightmapSurface.cginc"
And in this situation it might actually be better. But I am left wondering why giving a filename that’s relative to the Assets folder is not an option for DX11. I’m guessing that it was never recommended, since Aras doesn’t mention it in his answer. But it might have also been left out, because it was already mentioned in a previous answer.
Is using file-paths relative to the Assets folder no longer supported, or is this just a bug?