浏览代码

Update the name of the macro for clarity

/Yibing-Project-2
Evgenii Golubev 7 年前
当前提交
e8692e5c
共有 1 个文件被更改,包括 9 次插入8 次删除
  1. 17
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute

17
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute


#define TEXTURE_CACHE_BORDER 2
#define TEXTURE_CACHE_SIZE_1D (GROUP_SIZE_1D + 2 * TEXTURE_CACHE_BORDER)
// Check for support of typed UAV loads from FORMAT_R16G16B16A16_FLOAT.
#if defined(SHADER_API_PSSL) || defined(SHADER_API_XBOXONE)
#define TYPED_UAV_LOAD_FORMAT_R16G16B16A16_FLOAT
#if !(defined(SHADER_API_PSSL) || defined(SHADER_API_XBOXONE))
#define USE_INTERMEDIATE_BUFFER
#endif
//--------------------------------------------------------------------------------------------------

TEXTURE2D(_HTile); // DXGI_FORMAT_R8_UINT is not supported by Unity
TEXTURE2D(_IrradianceSource); // Includes transmitted light
#ifdef TYPED_UAV_LOAD_FORMAT_R16G16B16A16_FLOAT
RW_TEXTURE2D(float4, _CameraColorTexture); // Target texture
#else
#ifdef USE_INTERMEDIATE_BUFFER
#else
RW_TEXTURE2D(float4, _CameraColorTexture); // Target texture
#endif
//--------------------------------------------------------------------------------------------------

void WriteResult(uint2 pixelCoord, float3 irradiance)
{
#ifdef TYPED_UAV_LOAD_FORMAT_R16G16B16A16_FLOAT
_CameraColorTexture[pixelCoord] += float4(irradiance, 0);
#else
#ifdef USE_INTERMEDIATE_BUFFER
#else
_CameraColorTexture[pixelCoord] += float4(irradiance, 0);
#endif
}

正在加载...
取消
保存