Skip to content

Commit 63fb1a8

Browse files
committed
shaders: Reorder gbuffer render target outputs.
1 parent 2407c94 commit 63fb1a8

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

res/gamedata/shaders/gl/iostructs/p_bumped.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
out vec4 SV_Target0;
3-
#ifndef GBUFFER_OPTIMIZATION
43
out vec4 SV_Target1;
5-
#endif
4+
#ifndef GBUFFER_OPTIMIZATION
65
out vec4 SV_Target2;
6+
#endif
77
#ifdef EXTEND_F_DEFFER
88
out int gl_SampleMask[];
99
#endif
@@ -55,10 +55,12 @@ void main()
5555
#endif // MSAA_ALPHATEST_DX10_1_ATOC
5656

5757
SV_Target0 = O.position;
58-
#ifndef GBUFFER_OPTIMIZATION
58+
#ifdef GBUFFER_OPTIMIZATION
59+
SV_Target1 = O.C;
60+
#else
5961
SV_Target1 = O.Ne;
60-
#endif
6162
SV_Target2 = O.C;
63+
#endif
6264
#ifdef EXTEND_F_DEFFER
6365
gl_SampleMask[0] = O.mask;
6466
#endif

res/gamedata/shaders/gl/iostructs/p_flat.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
out vec4 SV_Target0;
3-
#ifndef GBUFFER_OPTIMIZATION
43
out vec4 SV_Target1;
5-
#endif
4+
#ifndef GBUFFER_OPTIMIZATION
65
out vec4 SV_Target2;
6+
#endif
77
#ifdef EXTEND_F_DEFFER
88
out int gl_SampleMask[];
99
#endif
@@ -51,10 +51,12 @@ void main()
5151
#endif // MSAA_ALPHATEST_DX10_1_ATOC
5252

5353
SV_Target0 = O.position;
54-
#ifndef GBUFFER_OPTIMIZATION
54+
#ifdef GBUFFER_OPTIMIZATION
55+
SV_Target1 = O.C;
56+
#else
5557
SV_Target1 = O.Ne;
56-
#endif
5758
SV_Target2 = O.C;
59+
#endif
5860
#ifdef EXTEND_F_DEFFER
5961
gl_SampleMask[0] = O.mask;
6062
#endif

res/gamedata/shaders/gl/iostructs/p_particle_deffer.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
out vec4 SV_Target0;
3-
#ifndef GBUFFER_OPTIMIZATION
43
out vec4 SV_Target1;
5-
#endif
4+
#ifndef GBUFFER_OPTIMIZATION
65
out vec4 SV_Target2;
6+
#endif
77
#ifdef EXTEND_F_DEFFER
88
out int gl_SampleMask[];
99
#endif
@@ -59,10 +59,12 @@ void main()
5959
#endif // MSAA_ALPHATEST_DX10_1_ATOC
6060

6161
SV_Target0 = O.position;
62-
#ifndef GBUFFER_OPTIMIZATION
62+
#ifdef GBUFFER_OPTIMIZATION
63+
SV_Target1 = O.C;
64+
#else
6365
SV_Target1 = O.Ne;
64-
#endif
6566
SV_Target2 = O.C;
67+
#endif
6668
#ifdef EXTEND_F_DEFFER
6769
gl_SampleMask[0] = O.mask;
6870
#endif

0 commit comments

Comments
 (0)