Commit b5ae49c
committed
Use colorModulateColorGen instead of disabling vertex color
Originally, vertex color array was disabled if colorGen CGEN_VERTEX or CGEN_ONE_MINUS_VERTEX or alphaGen CGEN_VERTEX or CGEN_ONE_MINUS_VERTEX were used,
resulting in the shader receiving the default OpenGL values for the disabled arrays (0.0, 0.0, 0.0, 1.0).
Now it will instead be set via setting a bit in `u_ColorModulateColorGen`, which allows skipping the vertex format change. It will also be necessary for the geometry cache.
Also fixes incorrect lighting with `tr.mapOverBrightBits = 3`.1 parent e6a66e6 commit b5ae49c
File tree
6 files changed
+23
-36
lines changed- src/engine/renderer
- glsl_source
6 files changed
+23
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | 1260 | | |
1267 | 1261 | | |
1268 | 1262 | | |
| |||
1288 | 1282 | | |
1289 | 1283 | | |
1290 | 1284 | | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | 1285 | | |
1300 | 1286 | | |
1301 | 1287 | | |
| |||
2144 | 2130 | | |
2145 | 2131 | | |
2146 | 2132 | | |
2147 | | - | |
2148 | | - | |
2149 | | - | |
2150 | | - | |
2151 | | - | |
2152 | | - | |
2153 | 2133 | | |
2154 | 2134 | | |
2155 | 2135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
| |||
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
131 | | - | |
132 | | - | |
| 129 | + | |
133 | 130 | | |
134 | 131 | | |
135 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2185 | 2185 | | |
2186 | 2186 | | |
2187 | 2187 | | |
2188 | | - | |
| 2188 | + | |
2189 | 2189 | | |
2190 | 2190 | | |
2191 | 2191 | | |
| |||
2217 | 2217 | | |
2218 | 2218 | | |
2219 | 2219 | | |
2220 | | - | |
| 2220 | + | |
2221 | 2221 | | |
2222 | 2222 | | |
2223 | 2223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3595 | 3595 | | |
3596 | 3596 | | |
3597 | 3597 | | |
3598 | | - | |
| 3598 | + | |
| 3599 | + | |
3599 | 3600 | | |
3600 | 3601 | | |
3601 | 3602 | | |
| |||
3625 | 3626 | | |
3626 | 3627 | | |
3627 | 3628 | | |
3628 | | - | |
| 3629 | + | |
3629 | 3630 | | |
3630 | 3631 | | |
3631 | 3632 | | |
| |||
3642 | 3643 | | |
3643 | 3644 | | |
3644 | 3645 | | |
3645 | | - | |
| 3646 | + | |
3646 | 3647 | | |
3647 | 3648 | | |
3648 | | - | |
| 3649 | + | |
3649 | 3650 | | |
3650 | 3651 | | |
3651 | 3652 | | |
| |||
3662 | 3663 | | |
3663 | 3664 | | |
3664 | 3665 | | |
3665 | | - | |
3666 | | - | |
3667 | | - | |
3668 | | - | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
3669 | 3672 | | |
3670 | 3673 | | |
3671 | 3674 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
0 commit comments