1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-02 20:29:17 +00:00

texture:: aura no longer flickers

This commit is contained in:
Zeno Rogue 2019-03-11 18:48:31 +01:00
parent 5db2cfbd1a
commit f6de21e143

View File

@ -361,12 +361,14 @@ bool texture_config::apply(cell *c, const transmatrix &V, color_t col) {
if(using_aura()) {
for(int i=0; i<isize(mi.tvertices); i += 3) {
ld p[3];
if(inHighQual)
while(true) {
p[0] = hrandf();
p[1] = hrandf();
p[2] = 1 - p[0] - p[1];
if(p[2] >= 0) break;
}
else p[0] = p[1] = p[2] = 1/3.;
ld v[2] = {0,0};
for(int j=0; j<2; j++) for(int k=0; k<3; k++)
v[j] += mi.tvertices[i+k][j] * p[k];