浏览代码

Fix PS4 compile issues with BFE

/RenderPassXR_Sandbox
Evgenii Golubev 8 年前
当前提交
2e3478e3
共有 4 个文件被更改,包括 5 次插入5 次删除
  1. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
  2. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl
  3. 2
      Assets/ScriptableRenderPipeline/ShaderLibrary/Common.hlsl
  4. 4
      Assets/ScriptableRenderPipeline/ShaderLibrary/Packing.hlsl

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


bsdfData.thickness = _ThicknessRemaps[subsurfaceProfile][0] +
_ThicknessRemaps[subsurfaceProfile][1] * thickness;
uint transmissionMode = BitFieldExtract(_TransmissionFlags, 2, 2 * subsurfaceProfile);
uint transmissionMode = BitFieldExtract(_TransmissionFlags, 2u, 2u * subsurfaceProfile);
bsdfData.enableTransmission = transmissionMode != SSS_TRSM_MODE_NONE;
bsdfData.useThinObjectMode = transmissionMode == SSS_TRSM_MODE_THIN;

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl


// Done one time for all layered - cumulate with spec occ alpha for now
surfaceData.specularOcclusion *= GetHorizonOcclusion(V, surfaceData.normalWS, interpolatedVertexNormal, _HorizonFade);
uint transmissionMode = BitFieldExtract(_TransmissionFlags, 2, 2 * surfaceData.subsurfaceProfile);
uint transmissionMode = BitFieldExtract(_TransmissionFlags, 2u, 2u * surfaceData.subsurfaceProfile);
if (transmissionMode != SSS_TRSM_MODE_THIN)
{

2
Assets/ScriptableRenderPipeline/ShaderLibrary/Common.hlsl


bool IsBitSet(uint data, uint bitPos)
{
return BitFieldExtract(data, 1, bitPos) != 0;
return BitFieldExtract(data, 1u, bitPos) != 0;
}
#ifndef INTRINSIC_CLAMP

4
Assets/ScriptableRenderPipeline/ShaderLibrary/Packing.hlsl


// Packs 8 lowermost bits of a [0..65535] integer into a [0..1] float.
float PackShortLo(uint i)
{
uint lo = BitFieldExtract(i, 8, 0);
uint lo = BitFieldExtract(i, 8u, 0u);
return PackInt(lo, 8);
}

uint hi = BitFieldExtract(i, 8, 8);
uint hi = BitFieldExtract(i, 8u, 8u);
return PackInt(hi, 8);
}

正在加载...
取消
保存