Skip to content

Commit

Permalink
shaders: Add GLSL port of rain shaders.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Mar 6, 2016
1 parent 221062a commit 87276b4
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 0 deletions.
23 changes: 23 additions & 0 deletions res/gamedata/shaders/gl/iostructs/p_rain_apply.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

out vec4 SV_Target;
#ifdef MSAA_OPTIMIZATION
in int gl_SampleID;
#endif

layout(location = TEXCOORD0) in float2 p_rain_tc ; // TEXCOORD0;
layout(location = TEXCOORD1) in float2 p_rain_tcJ ; // TEXCOORD1;

#ifdef MSAA_OPTIMIZATION
float4 _main ( float2 tc, float2 tcJ, uint iSample );
#else
float4 _main ( float2 tc, float2 tcJ );
#endif

void main()
{
#ifdef MSAA_OPTIMIZATION
SV_Target = _main ( p_rain_tc, p_rain_tcJ, gl_SampleID );
#else
SV_Target = _main ( p_rain_tc, p_rain_tcJ );
#endif
}
23 changes: 23 additions & 0 deletions res/gamedata/shaders/gl/iostructs/p_rain_layer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

out vec4 SV_Target;
#ifdef GBUFFER_OPTIMIZATION
in vec4 gl_FragCoord;
#endif

layout(location = TEXCOORD0) in float2 p_rain_tc ; // TEXCOORD0;
layout(location = TEXCOORD1) in float2 p_rain_tcJ ; // TEXCOORD1;

#ifdef GBUFFER_OPTIMIZATION
float4 _main ( float2 tc, float2 tcJ, float4 pos2d );
#else
float4 _main ( float2 tc, float2 tcJ );
#endif

void main()
{
#ifdef GBUFFER_OPTIMIZATION
SV_Target = _main ( p_rain_tc, p_rain_tcJ, gl_FragCoord );
#else
SV_Target = _main ( p_rain_tc, p_rain_tcJ );
#endif
}
43 changes: 43 additions & 0 deletions res/gamedata/shaders/gl/iostructs/p_rain_patch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

out vec4 SV_Target;
#ifdef MSAA_OPTIMIZATION
in int gl_SampleID;
#endif
#ifdef GBUFFER_OPTIMIZATION
in vec4 gl_FragCoord;
#endif

layout(location = TEXCOORD0) in float2 p_rain_tc ; // TEXCOORD0;
layout(location = TEXCOORD1) in float2 p_rain_tcJ ; // TEXCOORD1;
layout(location = COLOR) in float4 p_rain_Color; // COLOR;

#ifdef GBUFFER_OPTIMIZATION
#ifdef MSAA_OPTIMIZATION
float4 _main ( float2 tc, float2 tcJ, float4 Color, float4 pos2d, uint iSample );
#else
float4 _main ( float2 tc, float2 tcJ, float4 Color, float4 pos2d );
#endif
#else
#ifdef MSAA_OPTIMIZATION
float4 _main ( float2 tc, float2 tcJ, uint iSample );
#else
float4 _main ( float2 tc, float2 tcJ );
#endif
#endif

void main()
{
#ifdef GBUFFER_OPTIMIZATION
#ifdef MSAA_OPTIMIZATION
SV_Target = _main ( p_rain_tc, p_rain_tcJ, p_rain_Color, gl_FragCoord, gl_SampleID );
#else
SV_Target = _main ( p_rain_tc, p_rain_tcJ, p_rain_Color, gl_FragCoord );
#endif
#else
#ifdef MSAA_OPTIMIZATION
SV_Target = _main ( p_rain_tc, p_rain_tcJ, gl_SampleID );
#else
SV_Target = _main ( p_rain_tc, p_rain_tcJ );
#endif
#endif
}
Binary file added res/gamedata/shaders/gl/rain_apply_gloss.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_apply_gloss_msaa.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_apply_gloss_nomsaa.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_apply_normal.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_apply_normal_msaa.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_apply_normal_nomsaa.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_layer.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_patch_normal.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_patch_normal_msaa.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_patch_normal_new.ps
Binary file not shown.
Binary file added res/gamedata/shaders/gl/rain_patch_normal_nomsaa.ps
Binary file not shown.

0 comments on commit 87276b4

Please sign in to comment.