MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / blend

Method blend

src/main/java/net/optifine/LightMapPack.java:103–129  ·  view source on GitHub ↗
(int[] cols0, float br0, int[] cols1, float br1)

Source from the content-addressed store, hash-verified

101 }
102
103 private boolean blend(int[] cols0, float br0, int[] cols1, float br1)
104 {
105 if (cols1.length != cols0.length)
106 {
107 return false;
108 }
109 else
110 {
111 for (int i = 0; i < cols0.length; ++i)
112 {
113 int j = cols0[i];
114 int k = j >> 16 & 255;
115 int l = j >> 8 & 255;
116 int i1 = j & 255;
117 int j1 = cols1[i];
118 int k1 = j1 >> 16 & 255;
119 int l1 = j1 >> 8 & 255;
120 int i2 = j1 & 255;
121 int j2 = (int)((float)k * br0 + (float)k1 * br1);
122 int k2 = (int)((float)l * br0 + (float)l1 * br1);
123 int l2 = (int)((float)i1 * br0 + (float)i2 * br1);
124 cols0[i] = -16777216 | j2 << 16 | k2 << 8 | l2;
125 }
126
127 return true;
128 }
129 }
130
131 private boolean blend(int[] cols0, float br0, int[] cols1, float br1, int[] cols2, float br2)
132 {

Callers 1

updateLightmapMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected