From 3cf818e27bac22a5592fe6196fe34600ac1e23b0 Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Wed, 11 Mar 2026 22:37:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=9E=E6=BA=AF=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=9A=E5=9B=9E=E6=BA=AF=E5=90=8E=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E9=87=87=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复内容:回溯后添加 continue,重新采样回溯位置, 而不是直接执行累积代码 --- Res/Shader/volume.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Res/Shader/volume.hlsl b/Res/Shader/volume.hlsl index 1bd1e975..51c92d40 100644 --- a/Res/Shader/volume.hlsl +++ b/Res/Shader/volume.hlsl @@ -151,8 +151,8 @@ float4 MainPS(PSInput input) : SV_TARGET if (skip > 0) { tmin -= skip * 0.8; - worldPos = _CameraPos + rayDir * tmin; skip = 0; + continue; } float3 S = density * float3(1, 1, 1);