Closed laurentopia closed 3 years ago
All useful functions are inside BakeryDecodeLightmap.hlsl. If you have a basic HLSL shader that outputs some color/texture, you can #include "BakeryDecodeLightmap.hlsl" and use my function:
void BakeryVolume_float(float3 posWorld, float3 normalWorld, out float3 sh)
There is also a more advanced function with specular support:
void BakeryVolumeSpec_float(float3 posWorld, float3 normalWorld, float3 viewDir, float smoothness, float3 albedo, float metalness, out float3 diffuseSH, out float3 specularSH)
Additional parameters are:
Thanks you! And does BakeryVolumeSpec_float turn into BakeryVolume_float if specularSH isn't used (meaning the compiler strips out the extra computetion)? (Could you add that in the doc so it doesn't get lost in github?)
as much as i like graph shader, most powerful shaders out there are hlsl. so how do I add volume lighting to that, is there a block I can copy paste and do my own lighting mixing?