浏览代码

Optimize

/main
Evgenii Golubev 7 年前
当前提交
b465602c
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 6
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/SpaceFillingCurves.hlsl
  2. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.compute

6
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/SpaceFillingCurves.hlsl


return x;
}
// "Insert" two 0 bits after each of the 10 low bits of x/
// "Insert" two 0 bits after each of the 10 low bits of x.
// Ref: https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/
uint Part1By2(uint x)
{

return x;
}
// Inverse of Part1By1 - "delete" all odd-indexed bits/
// Inverse of Part1By1 - "delete" all odd-indexed bits.
// Ref: https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/
uint Compact1By1(uint x)
{

return x;
}
// Inverse of Part1By2 - "delete" all bits not at positions divisible by 3/
// Inverse of Part1By2 - "delete" all bits not at positions divisible by 3.
// Ref: https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/
uint Compact1By2(uint x)
{

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.compute


void SubsurfaceScattering(uint2 groupId : SV_GroupID,
uint groupThreadId : SV_GroupThreadID)
{
groupThreadId &= GROUP_SIZE_2D - 1; // Help the compiler
// Note: any factor of 64 is a suitable wave size for our algorithm.
uint waveIndex = WaveReadFirstLane(groupThreadId / 64);
uint laneIndex = groupThreadId % 64;

正在加载...
取消
保存