浏览代码

Fix various compilation error

/main
Sebastien Lagarde 6 年前
当前提交
96a16f75
共有 5 个文件被更改,包括 19 次插入8 次删除
  1. 7
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl
  2. 8
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.shader
  3. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/NormalBuffer.hlsl
  4. 1
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl
  5. 9
      com.unity.render-pipelines.high-definition/HDRP/Material/NormalBuffer.hlsl.meta

7
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl


// 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;

8
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.shader


HLSLPROGRAM
// In deferred, depth only pass don't output anything.
// In forward it output the normal buffer
#pragma multi_compile _ OUTPUT_NORMAL_BUFFER
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#include "../../ShaderVariables.hlsl"
#include "../../Material/Material.hlsl"

ENDHLSL
// In deferred, depth only pass don't output anything.
// In forward it output the normal buffer
#pragma multi_compile _ OUTPUT_NORMAL_BUFFER
}
Pass

2
com.unity.render-pipelines.high-definition/HDRP/Material/NormalBuffer.hlsl


float3 packNormalWS = normalBuffer.rgb;
float2 octNormalWS = Unpack888ToFloat2(packNormalWS);
normalData.normalWS = UnpackNormalOctQuadEncode(octNormalWS * 2.0 - 1.0);
normalData.perceptualRoughness = normalBuffer.a;
normalData.perceptualSmoothness = normalBuffer.a;
}
void DecodeFromNormalBuffer(uint2 positionSS, out NormalData normalData)

1
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl


// SurfaceData is defined in StackLit.cs which generates StackLit.cs.hlsl
#include "StackLit.cs.hlsl"
#include "../SubsurfaceScattering/SubsurfaceScattering.hlsl"
#include "../NormalBuffer.hlsl"
//#include "CoreRP/ShaderLibrary/VolumeRendering.hlsl"
//NEWLITTODO : wireup CBUFFERs for ambientocclusion, and other uniforms and samplers used:

9
com.unity.render-pipelines.high-definition/HDRP/Material/NormalBuffer.hlsl.meta


fileFormatVersion: 2
guid: c575b09819842744aa411a49f5a26660
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存