brightness behind the sphere configurable; works a bit better with transparency now

This commit is contained in:
Zeno Rogue committed 2017-11-13 12:23:42 +01:00
1 parent d8a279b15d
commit d8a647d972
4 files changed
+25 -22

No files matched your search

+6 -1
View File
@@ -740,6 +740,8 @@ ld xintval(const hyperpoint& h) {
return -intval(h, C0);
}
ld backbrightness = .25;
void drawqueue() {
int siz = size(ptds);
@@ -824,7 +826,10 @@ void drawqueue() {
#endif
if(ptd.kind == pkPoly || ptd.kind == pkLine) {
unsigned c = ptd.col;
ptd.col = (gradient(c>>8, backcolor, 0, .75, 1)<<8) | 0xFF;
int alpha = ptd.col & 255;
if(alpha == 255)
ptd.col = (gradient(backcolor, c>>8, 0, backbrightness, 1)<<8) | 0xFF;
else ptd.col = ptd.col - alpha + int(backbrightness * alpha);
drawqueueitem(ptd);
ptd.col = c;
}