浏览代码

first compiling version

/main
Sebastien Lagarde 7 年前
当前提交
240bc3d1
共有 14 个文件被更改,包括 169 次插入115 次删除
  1. 6
      ScriptableRenderPipeline/Core/Resources/BlitCubeTextureFace.shader
  2. 8
      ScriptableRenderPipeline/Core/Resources/EncodeBC6H.compute
  3. 2
      ScriptableRenderPipeline/Core/Resources/GPUCopy.compute
  4. 2
      ScriptableRenderPipeline/Core/ShaderLibrary/Packing.hlsl
  5. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDCustomSamplerId.cs
  6. 98
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  7. 4
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.cs
  8. 2
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/materialflags.compute
  9. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs
  10. 17
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
  11. 120
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CopyStencilBuffer.shader
  12. 12
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute
  13. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.shader
  14. 5
      ScriptableRenderPipeline/HDRenderPipeline/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl

6
ScriptableRenderPipeline/Core/Resources/BlitCubeTextureFace.shader


Shader "Hidden/SRP/BlitCubeTextureFace"
{
SubShader
SubShader
Pass
Pass
{
ZTest Always

HLSLPROGRAM
#include "../ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Common.hlsl"
#pragma vertex vert
#pragma fragment frag

8
ScriptableRenderPipeline/Core/Resources/EncodeBC6H.compute


#include "../ShaderLibrary/Common.hlsl"
#include "../ShaderLibrary/BC6H.hlsl"
#include "../ShaderLibrary/Sampling.hlsl"
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/BC6H.hlsl"
#include "ShaderLibrary/Sampling.hlsl"
TextureCube<float4> _Source;
RWTexture2DArray<uint4> _Target;

EncodeMode11(block, blockMSLE, texels);
_Target[dispatchThreadId] = block;
}
}

2
ScriptableRenderPipeline/Core/Resources/GPUCopy.compute


// Autogenerated file. Do not edit by hand
#include "../ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Common.hlsl"
SamplerState sampler_LinearClamp;

2
ScriptableRenderPipeline/Core/ShaderLibrary/Packing.hlsl


#ifndef UNITY_PACKING_INCLUDED
#define UNITY_PACKING_INCLUDED
#include "Common.hlsl"
//-----------------------------------------------------------------------------
// Normal packing
//-----------------------------------------------------------------------------

4
ScriptableRenderPipeline/HDRenderPipeline/HDCustomSamplerId.cs


PushGlobalParameters,
CopySetDepthBuffer,
CopyDepthStencilbuffer,
CopyStencilBuffer,
HTileForSSS,
Forward,
RenderSSAO,
RenderShadows,

InitGBuffersAndClearDepthStencil,
ClearSSSDiffuseTarget,
ClearSSSFilteringTarget,
ClearStencilTexture,
ClearAndCopyStencilTexture,
ClearHTile,
ClearHDRTarget,
ClearGBuffer,

98
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


// Renderer Bake configuration can vary depends on if shadow mask is enabled or no
RendererConfiguration m_currentRendererConfigurationBakedLighting = HDUtils.k_RendererConfigurationBakedLighting;
Material m_CopyStencilForSplitLighting;
Material m_CopyStencilForRegularLighting;
Material m_CopyStencilForNoLighting;
GPUCopy m_GPUCopy;
IBLFilterGGX m_IBLFilterGGX = null;

m_applyDistortionKernel = m_applyDistortionCS.FindKernel("KMain");
m_CopyStencilForSplitLighting = CoreUtils.CreateEngineMaterial("Hidden/HDRenderPipeline/CopyStencilBuffer");
m_CopyStencilForSplitLighting.EnableKeyword("EXPORT_HTILE");
m_CopyStencilForRegularLighting = CoreUtils.CreateEngineMaterial("Hidden/HDRenderPipeline/CopyStencilBuffer");
m_CopyStencilForRegularLighting.DisableKeyword("EXPORT_HTILE");
m_CopyStencilForRegularLighting.SetInt(HDShaderIDs._StencilRef, (int)StencilLightingUsage.RegularLighting);
m_CopyStencilForNoLighting = CoreUtils.CreateEngineMaterial("Hidden/HDRenderPipeline/CopyStencilBuffer");
m_CopyStencilForNoLighting.SetInt(HDShaderIDs._StencilRef, (int)StencilLightingUsage.NoLighting);
m_CameraMotionVectorsMaterial = CoreUtils.CreateEngineMaterial("Hidden/HDRenderPipeline/CameraMotionVectors");
InitializeDebugMaterials();

return NeedDepthBufferCopy() ? m_CameraDepthBufferCopy : m_CameraDepthStencilBuffer;
}
RenderTargetIdentifier GetStencilTexture()
{
return NeedStencilBufferCopy() ? m_CameraStencilBufferCopyRT : m_CameraDepthStencilBufferRT;
}
RenderTargetIdentifier GetHTile()
{
// Currently, Unity does not offer a way to access the GCN HTile.

}
}
void PrepareAndBindStencilTexture(CommandBuffer cmd)
{
if (NeedStencilBufferCopy())
{
using (new ProfilingSample(cmd, "Copy StencilBuffer", GetSampler(CustomSamplerId.CopyStencilBuffer)))
{
cmd.SetRandomWriteTarget(1, GetHTile());
// Our method of exporting the stencil requires one pass per unique stencil value.
CoreUtils.DrawFullScreen(cmd, m_CopyStencilForSplitLighting, m_CameraStencilBufferCopyRT, m_CameraDepthStencilBufferRT);
CoreUtils.DrawFullScreen(cmd, m_CopyStencilForRegularLighting, m_CameraStencilBufferCopyRT, m_CameraDepthStencilBufferRT);
cmd.ClearRandomWriteTargets();
}
}
cmd.SetGlobalTexture(HDShaderIDs._HTile, GetHTile());
cmd.SetGlobalTexture(HDShaderIDs._StencilTexture, GetStencilTexture());
}
public void UpdateCommonSettings()
{
var commonSettings = commonSettingsToUse;

RenderPyramidDepth(camera, cmd, renderContext, FullScreenDebugMode.DepthPyramid);
// Required for the SSS and the shader feature classification pass.
PrepareAndBindStencilTexture(cmd);
if (m_CurrentDebugDisplaySettings.IsDebugMaterialDisplayEnabled())
{
RenderDebugViewMaterial(m_CullResults, hdCamera, renderContext, cmd);

}
using (new ProfilingSample(cmd, "Render shadows", GetSampler(CustomSamplerId.RenderShadows)))
{
{
m_LightLoop.RenderShadows(renderContext, cmd, m_CullResults);
// TODO: check if statement below still apply
renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after RenderShadows as it modify our view/proj matrix

using (new ProfilingSample(cmd, "Build Light list", GetSampler(CustomSamplerId.BuildLightList)))
{
m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, GetStencilTexture());
// TODO: Move this code inside LightLoop
if (m_LightLoop.GetFeatureVariantsEnabled())
{
// For material classification we use compute shader and so can't read into the stencil, so prepare it.
using (new ProfilingSample(cmd, "Clear and copy stencil texture", GetSampler(CustomSamplerId.ClearAndCopyStencilTexture)))
{
CoreUtils.SetRenderTarget(cmd, m_CameraStencilBufferCopyRT, ClearFlag.Color, CoreUtils.clearColorAllBlack);
cmd.SetRandomWriteTarget(1, GetHTile());
// In the material classification shader we will simply test is we are no lighting
// Use ShaderPassID 1 => "Pass 1 - Write 1 if value different from stencilRef to output"
CoreUtils.DrawFullScreen(cmd, m_CopyStencilForNoLighting, m_CameraStencilBufferCopyRT, m_CameraDepthStencilBufferRT, null, 1);
cmd.ClearRandomWriteTargets();
}
}
m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, m_CameraStencilBufferCopyRT);
// Caution: We require sun light here as some sky use the sun light to render, mean UpdateSkyEnvironment
// must be call after BuildGPULightLists.
// TODO: Try to arrange code so we can trigger this call earlier and use async compute here to run sky convolution during other passes (once we move convolution shader to compute).
UpdateSkyEnvironment(hdCamera, cmd);
// Caution: We require sun light here as some sky use the sun light to render, mean UpdateSkyEnvironment
// must be call after BuildGPULightLists.
// TODO: Try to arrange code so we can trigger this call earlier and use async compute here to run sky convolution during other passes (once we move convolution shader to compute).
UpdateSkyEnvironment(hdCamera, cmd);
RenderDeferredLighting(hdCamera, cmd);

{
if (sssSettings.useDisneySSS)
{
using (new ProfilingSample(cmd, "HTile for SSS", GetSampler(CustomSamplerId.HTileForSSS)))
{
CoreUtils.SetRenderTarget(cmd, m_HTileRT, ClearFlag.Color, CoreUtils.clearColorAllBlack);
cmd.SetRandomWriteTarget(1, GetHTile());
// Generate HTile for the split lighting stencil usage. Don't write into stencil texture (shaderPassId = 2)
// Use ShaderPassID 1 => "Pass 2 - Export HTILE for stencilRef to output"
CoreUtils.DrawFullScreen(cmd, m_CopyStencilForSplitLighting, m_CameraStencilBufferCopyRT, m_CameraDepthStencilBufferRT, null, 2);
cmd.ClearRandomWriteTargets();
}
// TODO: Remove this once fix, see comment inside the function
hdCamera.SetupComputeShader(m_SubsurfaceScatteringCS, cmd);

cmd.SetComputeVectorArrayParam(m_SubsurfaceScatteringCS, HDShaderIDs._ShapeParams, sssParameters.shapeParams);
// TODO: abstract this in SSS manager
cmd.SetComputeTextureParam(m_SubsurfaceScatteringCS, m_SubsurfaceScatteringKernel, HDShaderIDs._SSSBufferTexture0, m_GbufferManager.GetGBuffers()[2]);
cmd.SetComputeTextureParam(m_SubsurfaceScatteringCS, m_SubsurfaceScatteringKernel, HDShaderIDs._SSSBufferTexture1, m_GbufferManager.GetGBuffers()[0]);
cmd.SetComputeTextureParam(m_SubsurfaceScatteringCS, m_SubsurfaceScatteringKernel, HDShaderIDs._SSSBufferTexture0, m_GbufferManager.GetGBuffers()[0]);
cmd.SetComputeTextureParam(m_SubsurfaceScatteringCS, m_SubsurfaceScatteringKernel, HDShaderIDs._DepthTexture, GetDepthTexture());
cmd.SetComputeTextureParam(m_SubsurfaceScatteringCS, m_SubsurfaceScatteringKernel, HDShaderIDs._HTile, GetHTile());

else
{
// TODO: abstract this in SSS manager
cmd.SetGlobalTexture(HDShaderIDs._SSSBufferTexture0, m_GbufferManager.GetGBuffers()[2]);
cmd.SetGlobalTexture(HDShaderIDs._SSSBufferTexture1, m_GbufferManager.GetGBuffers()[0]);
cmd.SetGlobalTexture(HDShaderIDs._SSSBufferTexture0, m_GbufferManager.GetGBuffers()[0]);
cmd.SetGlobalTexture(HDShaderIDs._IrradianceSource, m_CameraSssDiffuseLightingBufferRT); // Cannot set a RT on a material
m_SssVerticalFilterPass.SetVectorArray(HDShaderIDs._WorldScales, sssParameters.worldScales);

RenderTargetIdentifier[] m_MRTCache4 = new RenderTargetIdentifier[4];
m_MRTCache4[0] = m_CameraColorBufferRT;
m_MRTCache4[1] = m_CameraSssDiffuseLightingBufferRT;
m_MRTCache4[2] = m_GbufferManager.GetGBuffers()[2];
m_MRTCache4[3] = m_GbufferManager.GetGBuffers()[0];
m_MRTCache4[2] = m_GbufferManager.GetGBuffers()[0];
CoreUtils.SetRenderTarget(cmd, m_MRTCache4, m_CameraDepthStencilBufferRT);

}
}
// <<< Old SSS Model
if (NeedStencilBufferCopy())
{
using (new ProfilingSample(cmd, "Clear stencil texture", GetSampler(CustomSamplerId.ClearStencilTexture)))
{
CoreUtils.SetRenderTarget(cmd, m_CameraStencilBufferCopyRT, ClearFlag.Color, CoreUtils.clearColorAllBlack);
}
}
if (NeedHTileCopy())
{
using (new ProfilingSample(cmd, "Clear HTile", GetSampler(CustomSamplerId.ClearHTile)))
{
CoreUtils.SetRenderTarget(cmd, m_HTileRT, ClearFlag.Color, CoreUtils.clearColorAllBlack);
}
}
// TODO: As we are in development and have not all the setup pass we still clear the color in emissive buffer and gbuffer, but this will be removed later.

4
ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.cs


}
// Cluster
VoxelLightListGeneration(cmd, camera, projscr, invProjscr, cameraDepthBufferRT);
VoxelLightListGeneration(cmd, camera, projscr, invProjscr, cameraDepthBufferRT);
if (enableFeatureVariants)
{

}
}
}
using (new ProfilingSample(cmd, "Display Shadows", HDRenderPipeline.GetSampler(CustomSamplerId.TPDisplayShadows)))
{
if (lightingDebug.shadowDebugMode == ShadowMapDebugMode.VisualizeShadowMap)

2
ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/materialflags.compute


int idx = i * NR_THREADS + threadID;
uint2 uCrd = min( uint2(viTilLL.x + (idx & 0xf), viTilLL.y + (idx >> 4)), uint2(iWidth - 1, iHeight - 1));
if (UnpackByte(LOAD_TEXTURE2D(_StencilTexture, uCrd).r) != STENCILLIGHTINGUSAGE_NO_LIGHTING) // This test is we are the sky/background or not
if (LOAD_TEXTURE2D(_StencilTexture, uCrd).r == 1.0) // This test if we are the sky/background or a forward opaque (i.e we don't require lighting)
{
PositionInputs posInput = GetPositionInput(uCrd, invScreenSize);
materialFeatureFlags |= MATERIAL_FEATURE_FLAGS_FROM_GBUFFER(posInput.positionSS);

2
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs


public enum GBufferMaterial
{
// Note: This count doesn't include the velocity buffer. On shader and csharp side the velocity buffer will be added by the framework
Count = 4
Count = 4
};
//-----------------------------------------------------------------------------

17
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


#define GBufferType2 float4
#define GBufferType3 float4
#define SSSBufferType0 GBufferType2
#define SSSBufferType1 GBufferType0
// GBuffer texture declaration
TEXTURE2D(_GBufferTexture0);
TEXTURE2D(_GBufferTexture1);

#endif
}
SSSData ConvertSurfaceDataToSSSData(Surface surfaceData)
SSSData ConvertSurfaceDataToSSSData(SurfaceData surfaceData)
return sssData;
}
//-----------------------------------------------------------------------------

// and we will move the specular occlusion in GBuffer2. This is an optimization for SSSSS and have no other side effect as specular occlusion is always used
// during lighting pass when other buffer (Gbuffer0, 1, 2) and read anyway.
EncodeIntoSSSBuffer(ConvertSurfaceDataToSSSData(surfaceData), positionSS, outGBuffer0);
outGBuffer2.r = surfaceData.specularOcclusion;
outGBuffer2.g = surfaceData.thickness; // Use for transmission
outGBuffer2 = float4(surfaceData.specularOcclusion, surfaceData.thickness, 0.0, 0.0); // Thickness is use for transmission
}
else if (surfaceData.materialId == MATERIALID_LIT_ANISO)
{

if (bsdfData.materialId == MATERIALID_LIT_SSS)
{
DecodeSSSProfileFromSSSBuffer(inGBuffer0, positionSS, subsurfaceProfile);
DecodeSSSProfileFromSSSBuffer(inGBuffer0, positionSS, subsurfaceProfile);
bsdfData.specularOcclusion = inGBuffer2.r; // Reminder: when using SSS we exchange specular occlusion and subsurfaceRadius/profileID
thickness = inGBuffer2.g;
}

if (bsdfData.materialId == MATERIALID_LIT_SSS)
{
bsdfData.diffuseColor = ApplyDiffuseTexturingMode(bsdfData.diffuseColor, bsdfData.subsurfaceProfile);
}
}
// Premultiply bake diffuse lighting information with DisneyDiffuse pre-integration
return builtinData.bakeDiffuseLighting * preLightData.diffuseFGD * surfaceData.ambientOcclusion * bsdfData.diffuseColor + builtinData.emissiveColor;

float3 modifiedDiffuseColor;
if (bsdfData.materialId == MATERIALID_LIT_SSS)
modifiedDiffuseColor = ApplyDiffuseTexturingMode(bsdfData.diffuseColor, bsdfData.subsurfaceProfile)
modifiedDiffuseColor = ApplyDiffuseTexturingMode(bsdfData.diffuseColor, bsdfData.subsurfaceProfile);
else
modifiedDiffuseColor = bsdfData.diffuseColor;

120
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CopyStencilBuffer.shader


[HideInInspector] _StencilRef("_StencilRef", Int) = 1
}
HLSLINCLUDE
#pragma target 4.5
#pragma only_renderers d3d11 ps4 vulkan metal // TEMP: until we go further in dev
// #pragma enable_d3d11_debug_symbols
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Packing.hlsl"
#include "../../../ShaderVariables.hlsl"
#include "../../../Lighting/LightDefinition.cs.hlsl"
int _StencilRef;
RW_TEXTURE2D(float, _HTile); // DXGI_FORMAT_R8_UINT is not supported by Unity
struct Attributes
{
uint vertexID : SV_VertexID;
};
struct Varyings
{
float4 positionCS : SV_Position;
};
Varyings Vert(Attributes input)
{
Varyings output;
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID);
return output;
}
#pragma vertex Vert
ENDHLSL
Name "Pass 0 - Copy stencilRef to output"
Stencil
{
Ref [_StencilRef]

Blend Off
HLSLPROGRAM
#pragma target 4.5
#pragma only_renderers d3d11 ps4 vulkan metal // TEMP: until we go further in dev
#pragma multi_compile _ EXPORT_HTILE
// #pragma enable_d3d11_debug_symbols
#pragma vertex Vert
#include "ShaderLibrary/Packing.hlsl"
#include "../../../ShaderVariables.hlsl"
#include "../../../Lighting/LightDefinition.cs.hlsl"
// Force the stencil test before the UAV write.
[earlydepthstencil]
float4 Frag(Varyings input) : SV_Target // use SV_StencilRef in D3D 11.3+
{
return PackByte(_StencilRef);
}
int _StencilRef;
RW_TEXTURE2D(float, _HTile); // DXGI_FORMAT_R8_UINT is not supported by Unity
ENDHLSL
}
struct Attributes
Pass
{
Name "Pass 1 - Write 1 if value different from stencilRef to output"
Stencil
uint vertexID : SV_VertexID;
};
Ref [_StencilRef]
Comp NotEqual
Pass Keep
}
Cull Off
ZTest Always
ZWrite Off
Blend Off
struct Varyings
HLSLPROGRAM
#pragma fragment Frag
// Force the stencil test before the UAV write.
[earlydepthstencil]
float4 Frag(Varyings input) : SV_Target // use SV_StencilRef in D3D 11.3+
float4 positionCS : SV_Position;
};
return float4(1.0, 0.0, 0.0, 0.0);
}
ENDHLSL
}
Varyings Vert(Attributes input)
Pass
{
Name "Pass 2 - Export HTILE for stencilRef to output"
Stencil
Varyings output;
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID);
return output;
Ref [_StencilRef]
Comp Equal
Pass Keep
Cull Off
ZTest Always
ZWrite Off
Blend Off
ColorMask 0
HLSLPROGRAM
#pragma fragment Frag
// There's no need for atomics as we are always writing the same value.
// Note: the GCN tile size is 8x8 pixels.
_HTile[positionNDC / 8] = _StencilRef;
#ifdef EXPORT_HTILE
// There's no need for atomics as we are always writing the same value.
// Note: the GCN tile size is 8x8 pixels.
_HTile[positionNDC / 8] = _StencilRef;
#endif
return float4(0.0, 0.0, 0.0, 0.0);
}
return PackByte(_StencilRef);
}
ENDHLSL
}
}

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


// Included headers
//--------------------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary\Fibonacci.hlsl"
#include "ShaderLibrary/SpaceFillingCurves.hlsl"
#include "../../../ShaderVariables.hlsl"
#include "../../../Lighting/LightDefinition.cs.hlsl"

// The result of the stencil test allows us to statically determine the material type (SSS).
SSSData sssData;
DECODE_FROM_SSSBUFFER(pixelCoord, sssData);
DECODE_FROM_SSSBUFFER(posInput.positionSS, sssData);
int profileID = sssData.subsurfaceProfile;
float distScale = sssData.subsurfaceRadius;

float4x4 viewMatrix, projMatrix;
GetLeftHandedViewSpaceMatrices(viewMatrix, projMatrix);
// TODO: Since we have moved to forward SSS, we don't support anymore a bsdfData.normalWS.
// Once we include normal+roughness rendering during the prepass, we will have a buffer to bind here and we will be able to reuse this part of the algorithm on demand.
#if SSS_USE_TANGENT_PLANE
#else
float3 normalVS = float3(0, 0, 0);
float3 tangentX = float3(0, 0, 0);
float3 tangentY = float3(0, 0, 0);
#endif
#if SSS_DEBUG_NORMAL_VS
// We expect the normal to be front-facing.

2
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.shader


// Note: When we are in this SubsurfaceScattering shader we know that we are a SSS material.
SSSData sssData;
DECODE_FROM_SSSBUFFER(pixelCoord, sssData);
DECODE_FROM_SSSBUFFER(posInput.positionSS, sssData);
int profileID = sssData.subsurfaceProfile;
float distScale = sssData.subsurfaceRadius;

5
ScriptableRenderPipeline/HDRenderPipeline/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl


#include "SubsurfaceScatteringSettings.cs.hlsl"
#include "ShaderLibrary\Packing.hlsl"
CBUFFER_START(UnitySSSParameters)
// Warning: Unity is not able to losslessly transfer integers larger than 2^24 to the shader system.

float subsurfaceProfile;
};
#define SSSBufferType0 float4
void EncodeIntoSSSBuffer(SSSData sssData, uint2 positionSS, out SSSBufferType0 outSSSBuffer0, out SSSBufferType1 outSSSBuffer1)
void EncodeIntoSSSBuffer(SSSData sssData, uint2 positionSS, out SSSBufferType0 outSSSBuffer0)
{
outSSSBuffer0 = float4(sssData.diffuseColor, PackFloatInt8bit(sssData.subsurfaceRadius, sssData.subsurfaceProfile, 16.0));
}

正在加载...
取消
保存