init
This commit is contained in:
commit
2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions
19
gamedata/shaders/d3d11/distort.ps.hlsl
Normal file
19
gamedata/shaders/d3d11/distort.ps.hlsl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include "common.hlsli"
|
||||
|
||||
struct v2p
|
||||
{
|
||||
float2 tc : TEXCOORD0; // base & distort
|
||||
};
|
||||
|
||||
Texture2D s_distort;
|
||||
|
||||
// Pixel
|
||||
float4 main(v2p I) : SV_Target
|
||||
{
|
||||
float2 distort = s_distort.Sample(smp_rtlinear, I.tc).xy;
|
||||
float2 offset = (distort - 127.0f / 255.0f) * def_distort;
|
||||
float3 image = s_base.Sample(smp_rtlinear, I.tc + offset).xyz;
|
||||
|
||||
return float4(image, 1);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue