Files
VR-GAME/Library/Artifacts/50/505d010380e2704c36840557f4295f49

206 lines
18 KiB
Plaintext
Raw Normal View History

2026-04-25 12:12:07 +07:00
,J$,@0.0.0<00><><EFBFBD><EFBFBD><00><00><><EFBFBD> x2<78><32>%<25>Qyb<79> <20>!y3<00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00>E<00> <00><00>,<00>.<00>5<00>>a<00> <00><00>,<00>.<00>5<00><00><00>r<00> <00><00>, <00>.<00>5
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00><00><00>S<00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><01><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><01>e<00><00><><EFBFBD><EFBFBD><EFBFBD><01>H<00>{<00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00>,!<00>.<00>5"<00><00><><00><><EFBFBD><EFBFBD>#@1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>$<00><00><00>%.<00>j<00>&H<00><><00><><EFBFBD><EFBFBD>'<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>(@<00><00><00>)Q<00>j<00>*H<00><><00><><EFBFBD><EFBFBD>+<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>,@<00><00><00>-Q<00>j<00>.H<00><><00><><EFBFBD><EFBFBD>/<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>0@<00><00><00>1Q<00>j<00>2ComputeShaderImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_UserDatam_AssetBundleNamem_AssetBundleVariantH<00><>Ğ<EFBFBD>-Z<><58><D7AA>a<EFBFBD>4]<5D>=7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00>E<00> <00><00>$<00>.<00>-<00>6a<00> <00><00>$<00>.<00>-<00><00><00>r<00> <00><00>$ <00>.<00>-
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00><00><00>K<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><00>Tj<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00>q<00><00><><00><00><><00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><00>H<00><><00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00> Q<00>j<00><00><00><><00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><00> <00><00><00> <00>j<00><><EFBFBD><EFBFBD><EFBFBD> <00>
<00><00><><00><><EFBFBD><EFBFBD>!<00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>"@ <00><00><00># <00><00>j<00>$
<00><00><><00><><EFBFBD><EFBFBD>%<00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>&<00> <00><00><00>' <00>j<00><><EFBFBD><EFBFBD><EFBFBD>(<00> H<00><><00><><EFBFBD><EFBFBD>)<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>*@<00><00><00>+Q<00>j<00>, H<00><00><><EFBFBD><EFBFBD>-<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>.@<00><00><00>/Q<00>j<00>0 <00><00>1 <00><00>2 <00><00>*3 <00><00>74
<00><00>?<00><><EFBFBD><EFBFBD>5<00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>6<00> <00><00><00>7 <00>j<00><><EFBFBD><EFBFBD><EFBFBD>8<00> H<00><><00><><EFBFBD><EFBFBD>9<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>:@<00><00><00>;Q<00>j<00>< H<00><00><><EFBFBD><EFBFBD>=<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>>@<00><00><00>?Q<00>j<00>@ <00><00>A <00><00>B <00><00>*C <00><00>7D
<00><00>H<00><><EFBFBD><EFBFBD>E<00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>F@ <00><00><00>G Xj<00>H <00><00>tI <00><00>J
<00><00>|<00><><EFBFBD><EFBFBD>K<00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>L<00> <00><00><00>M <00>j<00><><EFBFBD><EFBFBD><EFBFBD>N<00> H<00><><00><><EFBFBD><EFBFBD>O<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>P@<00><00><00>QQ<00>j<00>R H<00><00><><EFBFBD><EFBFBD>S<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>T@<00><00><00>UQ<00>j<00>V <00><00>W <00><00>X <00><00>*Y <00><00>7Z
<00><00><><00><><EFBFBD><EFBFBD>[<00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>\<00> <00><00><00>] <00>j<00><><EFBFBD><EFBFBD><EFBFBD>^<00> H<00><><00><><EFBFBD><EFBFBD>_<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>`@<00><00><00>aQ<00>j<00>b H<00><00><><EFBFBD><EFBFBD>c<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>d@<00><00><00>eQ<00>j<00>f <00><00>g <00><00>h <00><00>*i <00><00>7j
<00><00><><00><><EFBFBD><EFBFBD>k<01> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>l@ <00><00><00>m <00><00>j<00>n
;<00><><00><><EFBFBD><EFBFBD>o 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>p <00><00><00>q <00><00>j<00>r
.<00><>s
<00><00><><00><><EFBFBD><EFBFBD>t<00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>u<00> <00><00><00>v H<00>j<00><><EFBFBD><EFBFBD><EFBFBD>w<00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>x@<00><00><00>yQ<00>j<00>z
L<00><>{@<00><00><><00><><EFBFBD><EFBFBD>|<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>}<00> <00><00><00>~ <00>j<00><><EFBFBD><EFBFBD><EFBFBD><00>
H<00><><00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00><00> Q<00>j<00><00>
<00><00>
<00><00><00><00><><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00> <00><00><00><00> H<00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>
1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00><00> Q<00>j<00><00><00><00><><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00> <00><00><00><00> H<00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>
1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00><00> Q<00>j<00><00><00><00><><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00> <00><00><00><00> H<00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>
1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00><00> Q<00>j<00><00><00><00><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00><00> Q<00>j<00><00><00><00>#<00><00><00>,<00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00> <00><00><00><00> 3j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>
H<00><><00><><EFBFBD><EFBFBD><EFBFBD><00> 1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00><00> Q<00>j<00><00>
<00><00>F<00>
<00><00>K<00>
<00><00>R<00>
<00><00>\<00>
<00><00>e<00>L<00>n<00>@<00><00><><00>L<00><><00>@<00><00><00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00><00><><00><00><00><00><00><00><00><00><00><00><00><00>(<00>H<00>6<00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<00><00><00><00>Q<00>j<00><00>H<00>E<00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<00><00><00><00>Q<00>j<00><00>H<00>L<00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<00><00><00><00>Q<00>j<00><00><00><00><><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00>H<00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<00><00><00><00>Q<00>j<00><00><00><00>W<00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00><00> Q<00>j<00><00>H<00>
<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ <00><00><00><00> Q<00>j<00><00><00><00>d<00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00>H<00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<00><00><00><00>Q<00>j<00><00>.<00>s<00><00><00><><00><00><00><><00><00><00><><00><00><00><><00><00><00><><00><00><00><><00><00><00><><00><00><00><><00><00><><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>H<00><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<00><00><00><00>Q<00>j<00><00>H<00><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<00><00><00><00>Q<00>j<00><00>H<00><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<00><00><00><00>Q<00>j<00><00><00><00><><00><00><00>#<00>L<00>(<00>L<00>0<00>@ComputeShaderPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>variantsComputeShaderPlatformVarianttargetRenderertargetLevelkernelsComputeShaderKernelParentnameuniqueVariantsComputeShaderKernelcbVariantIndicescbsComputeShaderResourcegeneratedNamebindPointsamplerBindPointtexDimensionresTypetexturesbuiltinSamplersComputeShaderBuiltinSamplersamplerinBuffersoutBufferscodethreadGroupSizerequirementskeywordsisCompiledvariantIndicesglobalKeywordslocalKeywordsdynamicKeywordsconstantBuffersComputeShaderCBbyteSizeparamsComputeShaderParamtypeoffsetarraySizerowCountcolCountresourcesResolvedcompilerPlatformneedsReflectionDataComputeShaderCompilationContextm_CompilationContextBuildTargetSelectionbuildTargetplatformsubTargetextendedPlatformisEditorplatformGroupsourceFileNamesourcesourceFilekernelMacrosprunedKeywordscompilationFlagssupportedAPIsuseDxcAPIsneverUseDxcAPIsincludeHash0includeHash1includeHash2includeHash3buildTargetAPIMaskerrorsShaderErrormessagemessageDetailsfilelinewarningruntimeErrorH<00>mP<00><00>mProbeVolumeCellDilation
DilateCellA<>
DilateCellA<>
DilateCellA<>
DilateCellA<>
DilateCellA<>ProbeVolumeCellDilation.compute<00>#pragma kernel DilateCell
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2 webgpu
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/EntityLighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.Dilate.cs.hlsl"
#include "Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolume.hlsl"
CBUFFER_START(APVDilation)
float4 _DilationParameters;
float4 _DilationParameters2;
CBUFFER_END
#define _ProbeCount (uint)_DilationParameters.x
#define _ValidityThreshold _DilationParameters.y
#define _SearchRadius _DilationParameters.z
#define _SquaredDistanceWeight (_DilationParameters.w > 0)
StructuredBuffer<int> _NeedDilating;
StructuredBuffer<float3> _ProbePositionsBuffer;
RWStructuredBuffer<DilatedProbe> _OutputProbes;
// Sampling is copied from SampleAPV()
void AddProbeSample(APVResources apvRes, float3 uvw, inout DilatedProbe probe, float weight, inout float shWeight, inout float soWeight, inout float poWeight)
{
// SH data
float4 L0_L1Rx = SAMPLE_TEXTURE3D_LOD(apvRes.L0_L1Rx, s_point_clamp_sampler, uvw, 0).rgba;
float4 L1G_L1Ry = SAMPLE_TEXTURE3D_LOD(apvRes.L1G_L1Ry, s_point_clamp_sampler, uvw, 0).rgba;
float4 L1B_L1Rz = SAMPLE_TEXTURE3D_LOD(apvRes.L1B_L1Rz, s_point_clamp_sampler, uvw, 0).rgba;
float4 l2_R = SAMPLE_TEXTURE3D_LOD(apvRes.L2_0, s_point_clamp_sampler, uvw, 0).rgba;
float4 l2_G = SAMPLE_TEXTURE3D_LOD(apvRes.L2_1, s_point_clamp_sampler, uvw, 0).rgba;
float4 l2_B = SAMPLE_TEXTURE3D_LOD(apvRes.L2_2, s_point_clamp_sampler, uvw, 0).rgba;
float4 l2_C = SAMPLE_TEXTURE3D_LOD(apvRes.L2_3, s_point_clamp_sampler, uvw, 0).rgba;
if (!all(L0_L1Rx.xyz < 0.0001f))
{
probe.L0 += L0_L1Rx.xyz * weight;
probe.L1_0 += float3(L0_L1Rx.w, L1G_L1Ry.x, L1B_L1Rz.x) * weight;
probe.L1_1 += float3(L1G_L1Ry.w, L1G_L1Ry.y, L1B_L1Rz.y) * weight;
probe.L1_2 += float3(L1B_L1Rz.w, L1G_L1Ry.z, L1B_L1Rz.z) * weight;
probe.L2_0 += float3(l2_R.x, l2_G.x, l2_B.x) * weight;
probe.L2_1 += float3(l2_R.y, l2_G.y, l2_B.y) * weight;
probe.L2_2 += float3(l2_R.z, l2_G.z, l2_B.z) * weight;
probe.L2_3 += float3(l2_R.w, l2_G.w, l2_B.w) * weight;
probe.L2_4 += float3(l2_C.x, l2_C.y, l2_C.z) * weight;
shWeight += weight;
}
float4 probeOcclusion = SAMPLE_TEXTURE3D_LOD(apvRes.ProbeOcclusion, s_linear_clamp_sampler, uvw, 0).rgba;
if (!all(probeOcclusion < 0.0001f))
{
probe.ProbeOcclusion = probeOcclusion * weight;
poWeight += weight;
}
// Sky occlusion data
if (_APVSkyOcclusionWeight > 0)
{
float4 SO_L0L1 = SAMPLE_TEXTURE3D_LOD(apvRes.SkyOcclusionL0L1, s_linear_clamp_sampler, uvw, 0).rgba * weight;
if (SO_L0L1.x >= 0.0001f)
{
probe.SO_L0L1 += SO_L0L1 * weight;
if (_APVSkyDirectionWeight > 0)
{
int3 texCoord = uvw * _APVPoolDim - 0.5f; // No interpolation for sky shading indices
uint index = LOAD_TEXTURE3D(apvRes.SkyShadingDirectionIndices, texCoord).x * 255.0;
probe.SO_Direction = index == 255 ? float3(0, 0, 0) : apvRes.SkyPrecomputedDirections[index].rgb * weight;
}
soWeight += weight;
}
}
}
void ScaleProbe(inout DilatedProbe probe, float weight)
{
probe.L0 *= weight;
probe.L1_0 *= weight;
probe.L1_1 *= weight;
probe.L1_2 *= weight;
probe.L2_0 *= weight;
probe.L2_1 *= weight;
probe.L2_2 *= weight;
probe.L2_3 *= weight;
probe.L2_4 *= weight;
}
[numthreads(64, 1, 1)]
void DilateCell(uint3 id : SV_DispatchThreadID)
{
if (id.x < _ProbeCount)
{
uint probeIdx = id.x;
if (_NeedDilating[probeIdx] > 0)
{
float3 centralPosition = _ProbePositionsBuffer[probeIdx] - _APVWorldOffset;
DilatedProbe probe = (DilatedProbe)0;
float3 uvw;
uint subdiv;
float shWeight = 0, soWeight = 0, poWeight = 0;
float3 uvwDelta = rcp(_APVPoolDim);
float3 biasedPosWS;
if (TryToGetPoolUVWAndSubdiv(FillAPVResources(), centralPosition, 0, 0, uvw, subdiv, biasedPosWS))
{
float stepSize = _APVMinBrickSize / 3.0f;
// Inflate search radius a bit.
float radius = 1.5f * _SearchRadius;
int iterationCount = ceil(radius / stepSize);
for (int x = -1; x <= 1; ++x)
{
for (int y = -1; y <= 1; ++y)
{
for (int z = -1; z <= 1; ++z)
{
float3 dir = normalize(float3(x, y, z));
for (int s = 0; s < iterationCount; ++s)
{
float3 samplePos = centralPosition + dir * (stepSize * s);
float3 sampleUVW;
if (TryToGetPoolUVW(FillAPVResources(), samplePos, 0, 0, sampleUVW))
{
float d = distance(samplePos, centralPosition);
if (d > 0 && d <= _SearchRadius)
{
if (_SquaredDistanceWeight)
{
d *= d;
}
AddProbeSample(FillAPVResources(), sampleUVW, probe, rcp(d), shWeight, soWeight, poWeight);
}
}
}
}
}
}
}
if (shWeight > 0)
ScaleProbe(probe, rcp(shWeight));
if (soWeight > 0)
probe.SO_L0L1 *= rcp(soWeight);
probe.SO_Direction = SafeNormalize(probe.SO_Direction);
if (poWeight > 0)
{
probe.ProbeOcclusion *= rcp(poWeight);
probe.ProbeOcclusion = saturate(probe.ProbeOcclusion);
}
_OutputProbes[probeIdx] = probe;
}
}
}
dPackages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeCellDilation.compute
DilateCellX<> <00><><EFBFBD><EFBFBD>/<2F><12><>!<21>a9<61>e