浏览代码

Fix anisotropy.

This will be refactored as the needed array organization stabilize.
/StackLit2
Stephane Laroche 6 年前
当前提交
21f0e8a4
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 8
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl

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


preLightData.layeredRoughnessT[1] = bsdfData.roughnessBT;
preLightData.layeredRoughnessB[1] = bsdfData.roughnessBB;
preLightData.iblPerceptualRoughness[0] = bsdfData.perceptualRoughnessA;
preLightData.iblPerceptualRoughness[1] = bsdfData.perceptualRoughnessB;
preLightData.iblPerceptualRoughness[BASE_LOBEA_IDX] = bsdfData.perceptualRoughnessA;
preLightData.iblPerceptualRoughness[BASE_LOBEB_IDX] = bsdfData.perceptualRoughnessB;
preLightData.iblAnisotropy[0] = bsdfData.anisotropy;
preLightData.iblAnisotropy[1] = bsdfData.anisotropy;
float3 f0forCalculatingFGD = bsdfData.fresnel0;
if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_IRIDESCENCE))

// iblPerceptualRoughness is used as input and output here:
GetGGXAnisotropicModifiedNormalAndRoughness(bsdfData.bitangentWS,
bsdfData.tangentWS,
N[BASE_NORMAL_IDX],
N[BASE_NORMAL_IDX], // N[] is sized one in this case here, so really N[0]
V,
preLightData.iblAnisotropy[0],
preLightData.iblPerceptualRoughness[BASE_LOBEA_IDX],

正在加载...
取消
保存