add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
27
gamedata/shaders/d3d11/postprocess.ps.hlsl
Normal file
27
gamedata/shaders/d3d11/postprocess.ps.hlsl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "common.hlsli"
|
||||
|
||||
Texture2D s_base0;
|
||||
Texture2D s_base1;
|
||||
Texture2D s_noise;
|
||||
|
||||
uniform float4 c_brightness;
|
||||
|
||||
// Pixel
|
||||
float4 main(p_postpr I) : SV_Target
|
||||
{
|
||||
float3 t_0 = saturate(s_base0.Sample(smp_rtlinear, I.Tex0.xy).xyz);
|
||||
float3 t_1 = saturate(s_base1.Sample(smp_rtlinear, I.Tex1.xy).xyz);
|
||||
float3 image = (t_0 + t_1) * 0.5f;
|
||||
|
||||
float gray = dot(image, I.Gray.xyz);
|
||||
image = lerp(gray, image, I.Gray.w);
|
||||
|
||||
float3 t_noise = s_noise.Sample(smp_linear, I.Tex2.xy).xyz;
|
||||
float3 noised = image * t_noise * 2.0f;
|
||||
|
||||
image = lerp(noised, image, I.Color.w);
|
||||
image = (image * I.Color.xyz + c_brightness.xyz) * 2.0f;
|
||||
|
||||
return float4(image, 1.0h);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue