add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
21
gamedata/shaders/d3d11/combine_distort.ps.hlsl
Normal file
21
gamedata/shaders/d3d11/combine_distort.ps.hlsl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "common.hlsli"
|
||||
Texture2D s_distort;
|
||||
|
||||
float4 main(v2p_TL Input) : SV_Target
|
||||
{
|
||||
float4 distort = s_distort.SampleLevel(smp_nofilter, Input.Tex0, 0);
|
||||
float2 offset = distort.xy - (127.0f / 255.0f);
|
||||
|
||||
float2 center = Input.Tex0 + offset * def_distort;
|
||||
float depth_x = s_position.SampleLevel(smp_nofilter, center, 0).x;
|
||||
|
||||
#ifdef SIMPLE_DISTORTION_FIX
|
||||
float depth = s_position.SampleLevel(smp_nofilter, Input.Tex0, 0).x;
|
||||
#else
|
||||
#define depth 0.02f
|
||||
#endif
|
||||
center = depth_x < depth ? Input.Tex0 : center;
|
||||
|
||||
return s_image.SampleLevel(smp_nofilter, center, 0);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue