|
|
|
|
|
|
// SurfaceData is define in Lit.cs which generate Lit.cs.hlsl |
|
|
|
#include "Lit.cs.hlsl" |
|
|
|
#include "../SubsurfaceScattering/SubsurfaceScattering.hlsl" |
|
|
|
#include "../NormalBuffer.hlsl" |
|
|
|
#include "CoreRP/ShaderLibrary/VolumeRendering.hlsl" |
|
|
|
|
|
|
|
//----------------------------------------------------------------------------- |
|
|
|
|
|
|
{ |
|
|
|
NormalData normalData; |
|
|
|
|
|
|
|
normalData.normalWS = surfaceData.normalWS; |
|
|
|
|
|
|
|
normalData.normalWS = surfaceData.coatNormalWS; |
|
|
|
normalData.normalWS = surfaceData.normalWS; |
|
|
|
normalData.perceptualSmoothness = surfaceData.perceptualSmoothness; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
NormalData normalData; |
|
|
|
DecodeFromNormalBuffer(inGBuffer1, positionSS, normalData); |
|
|
|
bsdfData.normalWS = normalData.normalWS; |
|
|
|
bsdfData.perceptualRoughness = normalData.perceptualRoughness; |
|
|
|
bsdfData.perceptualRoughness = normalData.perceptualSmoothness; |
|
|
|
|
|
|
|
bakeDiffuseLighting = inGBuffer3.rgb; |
|
|
|
|
|
|
|