add game&rawdata

This commit is contained in:
Vasily Petrov 2026-06-17 23:06:51 +03:00
parent 0133cd976c
commit 49b34b5546
45731 changed files with 709831 additions and 0 deletions

View file

@ -0,0 +1,25 @@
#include "fluid_common_render.hlsli"
// Pixel
// TODO: DX10: replace WorldViewProjection with m_WVP
float4 main(PS_INPUT_RAYDATA_FRONT input) : SV_Target
{
float4 output;
// float sceneZ = sceneDepthTex.SampleLevel( samLinearClamp, float2(input.pos.x/RTWidth, input.pos.y/RTHeight),0).r;
float sceneZ = sceneDepthTex.SampleLevel(samLinearClamp, float2(input.pos.x / RTWidth, input.pos.y / RTHeight), 0).z;
if (sceneZ < Z_EPSILON)
{
sceneZ = Z_MAX;
}
if (sceneZ < input.depth)
{
// If the scene occludes intersection point we want to kill the pixel early in PS
return OCCLUDED_PIXEL_RAYVALUE;
}
// We negate input.posInGrid because we use subtractive blending in front faces
// Note that we set xyz to 0 when rendering back faces
output.xyz = -input.posInGrid;
output.w = input.depth;
return output;
}