Hi, I’m trying to write post process compatible with the HDRP post process stack. But I’m running into issues with my includes. I was rewriting an experimental SSGI that I did for built-in pipeline forward rendering in the past, where I use stuff from “UnityCG.cginc”. Which I as I understand now have to substitude with functionality provided in “StdLib.hlsl”.
For now, the whole shader code is pretty much empty, just returns a float4(1, 0, 0, 1); in the frag function, so the code overall shouldn’t be important at all, apart for the includes.
My minimal that I’m working with for now are:
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl"
But the include of StdLib.hlsl results in
Shader error in 'Hidden/Shader/SSGI': redefinition of 'Min3' at /Projekty/TestProject/UnityProject/TestProject/Library/PackageCache/com.unity.postprocessing@2.3.0/PostProcessing/Shaders/StdLib.hlsl(72) (on d3d11)
Compiling Vertex program
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
Unity 2019.3.15f1
HDRP 7.3.1
Post Processing 2.3.0
(Edit: is the same with Unity 2020.1.0b14 + HDRP 8.1.0 + PostProcessing 2.3.0)
Can someone help me with what should I do to be able to use StdLib.hlsl functionality here? Honestly feels like a bug to me that this is happening, though I’m still hoping for some stupid error on my part. Getting very desperate with the whole HDRP+PostProcessing+Deferred rendering approach after just 2 days of testing it out.
On a related note, is there -any- resource on what I can even work with in regards of shaders functionality? Documentation how to read depth and normal buffers, transfer depth to world space, anything actually documenting functionality available to us? I’m just trying to decipher some random codes I stumble upon for other effects, but that’s not really how programming should ideally work (though it sadly does more often than not). Some shader+postprocessing API overview at least really for the new postprocessing stack/pipelines/rendering paths.
Anything describing what “includes” are available to us, and what funcs they have?