-
-
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 dynamic lighting shaders.
- Loading branch information
Showing
25 changed files
with
99 additions
and
9 deletions.
There are no files selected for viewing
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.
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.
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,41 @@ | ||
|
||
out vec4 SV_Target; | ||
#ifdef GBUFFER_OPTIMIZATION | ||
in vec4 gl_FragCoord; | ||
#endif | ||
#ifdef MSAA_OPTIMIZATION | ||
in int gl_SampleID; | ||
#endif | ||
|
||
layout(location = TEXCOORD0) in float4 p_accum_omni_tc ; // TEXCOORD0; | ||
|
||
#ifdef MSAA_OPTIMIZATION | ||
#ifdef GBUFFER_OPTIMIZATION | ||
float4 _main ( float4 tc, float4 pos2d, uint iSample ); | ||
#else | ||
float4 _main ( float4 tc, uint iSample ); | ||
#endif | ||
#else | ||
#ifdef GBUFFER_OPTIMIZATION | ||
float4 _main ( float4 tc, float4 pos2d ); | ||
#else | ||
float4 _main ( float4 tc ); | ||
#endif | ||
#endif | ||
|
||
void main() | ||
{ | ||
#ifdef MSAA_OPTIMIZATION | ||
#ifdef GBUFFER_OPTIMIZATION | ||
SV_Target = _main ( p_accum_omni_tc, gl_FragCoord, gl_SampleID ); | ||
#else | ||
SV_Target = _main ( p_accum_omni_tc, gl_SampleID ); | ||
#endif | ||
#else | ||
#ifdef GBUFFER_OPTIMIZATION | ||
SV_Target = _main ( p_accum_omni_tc, gl_FragCoord ); | ||
#else | ||
SV_Target = _main ( p_accum_omni_tc ); | ||
#endif | ||
#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 |
---|---|---|
@@ -1,32 +1,50 @@ | ||
|
||
out vec4 SV_Target; | ||
#ifdef GBUFFER_OPTIMIZATION | ||
in vec4 gl_FragCoord; | ||
#endif | ||
#ifdef MSAA_OPTIMIZATION | ||
in int gl_SampleID; | ||
#endif | ||
|
||
layout(location = TEXCOORD0) in float4 v2p_volume_tc ; // TEXCOORD0; | ||
layout(location = TEXCOORD0) in float4 p_volume_tc ; // TEXCOORD0; | ||
#ifdef USE_SJITTER | ||
layout(location = TEXCOORD1) in float4 v2p_volume_tcJ ; // TEXCOORD1; | ||
layout(location = TEXCOORD1) in float4 p_volume_tcJ ; // TEXCOORD1; | ||
#endif | ||
|
||
#ifdef MSAA_OPTIMIZATION | ||
float4 _main ( v2p_volume I, uint iSample ); | ||
#ifdef GBUFFER_OPTIMIZATION | ||
float4 _main( p_volume I, float4 pos2d, uint iSample ); | ||
#else | ||
float4 _main( p_volume I, uint iSample ); | ||
#endif | ||
#else | ||
float4 _main ( v2p_volume I ); | ||
#ifdef GBUFFER_OPTIMIZATION | ||
float4 _main( p_volume I, float4 pos2d ); | ||
#else | ||
float4 _main( p_volume I ); | ||
#endif | ||
#endif | ||
|
||
void main() | ||
{ | ||
v2p_volume I; | ||
I.tc = v2p_volume_tc; | ||
p_volume I; | ||
I.tc = p_volume_tc; | ||
#ifdef USE_SJITTER | ||
I.tcJ = v2p_volume_tcJ; | ||
I.tcJ = p_volume_tcJ; | ||
#endif | ||
|
||
#ifdef MSAA_OPTIMIZATION | ||
SV_Target = _main ( I, gl_SampleID ); | ||
#ifdef GBUFFER_OPTIMIZATION | ||
SV_Target = _main( I, gl_FragCoord, gl_SampleID ); | ||
#else | ||
SV_Target = _main ( I ); | ||
SV_Target = _main( I, gl_SampleID ); | ||
#endif | ||
#else | ||
#ifdef GBUFFER_OPTIMIZATION | ||
SV_Target = _main( I, gl_FragCoord ); | ||
#else | ||
SV_Target = _main( I ); | ||
#endif | ||
#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,31 @@ | ||
|
||
out vec4 SV_Target; | ||
#ifdef MSAA_OPTIMIZATION | ||
in int gl_SampleID; | ||
#endif | ||
|
||
layout(location = TEXCOORD0) in float4 p_volume_tc ; // TEXCOORD0; | ||
#ifdef USE_SJITTER | ||
layout(location = TEXCOORD1) in float4 p_volume_tcJ ; // TEXCOORD1; | ||
#endif | ||
|
||
#ifdef MSAA_OPTIMIZATION | ||
float4 _main ( v2p_volume I, uint iSample ); | ||
#else | ||
float4 _main ( v2p_volume I ); | ||
#endif | ||
|
||
void main() | ||
{ | ||
v2p_volume I; | ||
I.tc = p_volume_tc; | ||
#ifdef USE_SJITTER | ||
I.tcJ = p_volume_tcJ; | ||
#endif | ||
|
||
#ifdef MSAA_OPTIMIZATION | ||
SV_Target = _main ( I, gl_SampleID ); | ||
#else | ||
SV_Target = _main ( I ); | ||
#endif | ||
} |