-
-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shaders: Add GLSL port of rain shaders.
- Loading branch information
Showing
14 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.