浏览代码

Add an option to disable texture cache

/RenderPassXR_Sandbox
Evgenii Golubev 7 年前
当前提交
f296a470
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute

9
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute


// Tweak parameters.
#define SSS_BILATERAL_FILTER 1
#define SSS_USE_LDS_CACHE 1
#define SSS_USE_TANGENT_PLANE 0
#define SSS_CLAMP_ARTIFACT 0
#define SSS_DEBUG_LOD 0

//--------------------------------------------------------------------------------------------------
// 6656 bytes used. It appears that the reserved LDS space must be a multiple of 512 bytes.
#if SSS_USE_LDS_CACHE != 0
#endif
groupshared bool processGroup;
bool StencilTest(int2 pixelCoord, float stencilRef)

return passedStencilTest;
}
#if SSS_USE_LDS_CACHE != 0
#endif
float4 LoadSampleFromVideoMemory(int2 pixelCoord)
{

bool isInCache = cacheCoord.x >= 0 && cacheCoord.x < TEXTURE_CACHE_SIZE_1D &&
cacheCoord.y >= 0 && cacheCoord.y < TEXTURE_CACHE_SIZE_1D;
#if SSS_USE_LDS_CACHE != 0
#endif
{
float stencilRef = STENCILLIGHTINGUSAGE_SPLIT_LIGHTING;

cachedValue = float4(centerIrradiance, LinearEyeDepth(centerDepth, _ZBufferParams));
}
#if SSS_USE_LDS_CACHE != 0
// Populate the central region of the LDS cache.
textureCache[cacheCoord.x][cacheCoord.y] = cachedValue;

// Wait for the LDS.
GroupMemoryBarrierWithGroupSync();
#endif
bool isOffScreen = pixelCoord.x >= (uint)_ScreenSize.x || pixelCoord.y >= (uint)_ScreenSize.y;

正在加载...
取消
保存