This commit is contained in:
Vasily Petrov 2026-06-18 01:18:29 +03:00
commit 2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#include "fluid_common_render.hlsli"
void main(PS_INPUT_RAYDATA_BACK input, out float4 output : SV_Target)
{
float sceneZ = sceneDepthTex.SampleLevel(samLinearClamp, float2(input.pos.x / RTWidth, input.pos.y / RTHeight), 0).x;
sceneZ = DepthUnpack.x * rcp(sceneZ - DepthUnpack.y);
// This value will only remain if no fragments get blended on top in the next pass (front-faces)
// which would happen if the front faces of the box get clipped by the near plane of the camera
output.xyz = NEARCLIPPED_PIXEL_RAYPOS;
output.w = min(input.depth, sceneZ);
}