init
This commit is contained in:
commit
2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions
13
gamedata/shaders/d3d11/fluid_raydata_back.ps.hlsl
Normal file
13
gamedata/shaders/d3d11/fluid_raydata_back.ps.hlsl
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue