init
This commit is contained in:
commit
2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions
25
gamedata/shaders/d3d11/ssao_calc.ps.hlsl
Normal file
25
gamedata/shaders/d3d11/ssao_calc.ps.hlsl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include "common.hlsli"
|
||||
|
||||
uniform Texture2D s_half_depth;
|
||||
#include "ssao.ps.hlsl"
|
||||
|
||||
struct _input
|
||||
{
|
||||
float4 tc0 : TEXCOORD0; // tc.xy, tc.w = tonemap scale
|
||||
float2 tcJ : TEXCOORD1; // jitter coords
|
||||
float4 pos2d : SV_POSITION;
|
||||
};
|
||||
|
||||
float4 main(_input I) : SV_Target0
|
||||
{
|
||||
IXrayGbuffer O;
|
||||
GbufferUnpack(I.tc0.xy, I.pos2d.xy, O);
|
||||
|
||||
if(O.Depth > 0.9999f) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
float occ = calc_ssao(O.Depth, O.Normal, I.tc0.xy);
|
||||
return float4(occ, occ, occ, occ);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue