Skip to content

Commit

Permalink
GLSL shaders fixes
Browse files Browse the repository at this point in the history
MSAA and HBAO is broken
And level fog is... yellow
  • Loading branch information
Xottab-DUTY committed Feb 4, 2018
1 parent 137605d commit 43445e5
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 7 deletions.
Binary file modified res/gamedata/shaders/gl/combine_1.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/combine_2_naa.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/combine_volumetric.ps
Binary file not shown.
10 changes: 5 additions & 5 deletions res/gamedata/shaders/gl/common_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ gbuffer_data gbuffer_load_data( float2 tc, float4 pos2d, uint iSample )
#ifndef USE_MSAA
float4 P = tex2D( s_position, tc );
#else
float4 P = texelFetch( s_position, int2( pos2d ), 0, iSample );
float4 P = texelFetch( s_position, int2( pos2d ), int(iSample) );
#endif

// 3d view space pos reconstruction math
Expand All @@ -264,7 +264,7 @@ gbuffer_data gbuffer_load_data( float2 tc, float4 pos2d, uint iSample )
#ifndef USE_MSAA
float4 C = tex2D( s_diffuse, tc );
#else
float4 C = texelFetch( s_diffuse, int2( pos2d ), 0, iSample );
float4 C = texelFetch( s_diffuse, int2( pos2d ), int(iSample) );
#endif

gbd.C = C.xyz;
Expand Down Expand Up @@ -300,7 +300,7 @@ gbuffer_data gbuffer_load_data( float2 tc, uint iSample )
#ifndef USE_MSAA
float4 P = tex2D( s_position, tc );
#else
float4 P = texelFetch( s_position, int2( tc * pos_decompression_params2.xy ), 0, iSample );
float4 P = texelFetch( s_position, int2( tc * pos_decompression_params2.xy ), int(iSample) );
#endif

gbd.P = P.xyz;
Expand All @@ -309,7 +309,7 @@ gbuffer_data gbuffer_load_data( float2 tc, uint iSample )
#ifndef USE_MSAA
float4 N = tex2D( s_normal, tc );
#else
float4 N = texelFetch( s_normal, int2( tc * pos_decompression_params2.xy ), 0, iSample );
float4 N = texelFetch( s_normal, int2( tc * pos_decompression_params2.xy ), int(iSample) );
#endif

gbd.N = N.xyz;
Expand All @@ -318,7 +318,7 @@ gbuffer_data gbuffer_load_data( float2 tc, uint iSample )
#ifndef USE_MSAA
float4 C = tex2D( s_diffuse, tc );
#else
float4 C = texelFetch( s_diffuse, int2( tc * pos_decompression_params2.xy ), 0, iSample );
float4 C = texelFetch( s_diffuse, int2( tc * pos_decompression_params2.xy ), int(iSample) );
#endif


Expand Down
Binary file modified res/gamedata/shaders/gl/copy.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/copy_p.ps
Binary file not shown.
4 changes: 2 additions & 2 deletions res/gamedata/shaders/gl/dof.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ float3 dof(float2 center)
#ifndef USE_MSAA
float depth = tex2D(s_position,center).z;
#else
float depth = texelFetch(s_position, int2( center * pos_decompression_params2.xy ), 0, 0).z;
float depth = texelFetch(s_position, int2( center * pos_decompression_params2.xy ), 0).z;
#endif
if (depth <= EPSDEPTHDOF) depth = dof_params.w;
float blur = DOFFactor(depth);
Expand Down Expand Up @@ -79,7 +79,7 @@ float3 dof(float2 center)
#ifndef USE_MSAA
float tap_depth = tex2D (s_position,tap).z;
#else
float tap_depth = texelFetch(s_position, int2( tap* pos_decompression_params2.xy ), 0, 0).z;
float tap_depth = texelFetch(s_position, int2( tap* pos_decompression_params2.xy ), 0).z;
#endif
if (tap_depth <= EPSDEPTHDOF) tap_depth = dof_params.w;
float tap_contrib = DOFFactor(tap_depth);
Expand Down
Binary file modified res/gamedata/shaders/gl/rain_apply_gloss.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/rain_apply_normal.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/ssao.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/ssao_blur.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/ssao_calc.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/ssao_hbao.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/ssao_hdao.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/ssao_hdao_new.ps
Binary file not shown.

0 comments on commit 43445e5

Please sign in to comment.