Commit 4166989
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 e9c9324 commit 4166989
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 | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | 1110 | | |
1117 | 1111 | | |
1118 | 1112 | | |
| |||
1138 | 1132 | | |
1139 | 1133 | | |
1140 | 1134 | | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | 1135 | | |
1150 | 1136 | | |
1151 | 1137 | | |
| |||
2138 | 2124 | | |
2139 | 2125 | | |
2140 | 2126 | | |
2141 | | - | |
2142 | | - | |
2143 | | - | |
2144 | | - | |
2145 | | - | |
2146 | | - | |
2147 | 2127 | | |
2148 | 2128 | | |
2149 | 2129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
| |||
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
123 | | - | |
124 | | - | |
| 121 | + | |
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2220 | 2220 | | |
2221 | 2221 | | |
2222 | 2222 | | |
2223 | | - | |
| 2223 | + | |
2224 | 2224 | | |
2225 | 2225 | | |
2226 | 2226 | | |
| |||
2252 | 2252 | | |
2253 | 2253 | | |
2254 | 2254 | | |
2255 | | - | |
| 2255 | + | |
2256 | 2256 | | |
2257 | 2257 | | |
2258 | 2258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3664 | 3664 | | |
3665 | 3665 | | |
3666 | 3666 | | |
3667 | | - | |
| 3667 | + | |
| 3668 | + | |
3668 | 3669 | | |
3669 | 3670 | | |
3670 | 3671 | | |
| |||
3694 | 3695 | | |
3695 | 3696 | | |
3696 | 3697 | | |
3697 | | - | |
| 3698 | + | |
3698 | 3699 | | |
3699 | 3700 | | |
3700 | 3701 | | |
| |||
3711 | 3712 | | |
3712 | 3713 | | |
3713 | 3714 | | |
3714 | | - | |
| 3715 | + | |
3715 | 3716 | | |
3716 | 3717 | | |
3717 | | - | |
| 3718 | + | |
3718 | 3719 | | |
3719 | 3720 | | |
3720 | 3721 | | |
| |||
3731 | 3732 | | |
3732 | 3733 | | |
3733 | 3734 | | |
3734 | | - | |
3735 | | - | |
3736 | | - | |
3737 | | - | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
3738 | 3741 | | |
3739 | 3742 | | |
3740 | 3743 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
0 commit comments