mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-16 23:30:20 +01:00
Set transparency attenuation to %45 + 2%/m.
This commit is contained in:
parent
f5d84f0b7b
commit
f3ed470d57
|
@ -115,8 +115,8 @@ func (colors *Colors) BlendColors(span *Span, col color.RGBA, pos int32) color.R
|
||||||
}
|
}
|
||||||
const scale = float32(1) / float32(100)
|
const scale = float32(1) / float32(100)
|
||||||
for ; curr != nil; curr = curr.Next {
|
for ; curr != nil; curr = curr.Next {
|
||||||
// At least 35% attenuation + 5% extra for each depth meter.
|
// At least 45% attenuation + 2% extra for each depth meter.
|
||||||
factor := float32(min(100, 35+(curr.To-curr.From)*5)) * scale
|
factor := float32(min(100, 45+(curr.To-curr.From)*2)) * scale
|
||||||
col = BlendColor(colors.Colors[curr.Value], col, factor)
|
col = BlendColor(colors.Colors[curr.Value], col, factor)
|
||||||
}
|
}
|
||||||
return col
|
return col
|
||||||
|
|
Loading…
Reference in New Issue
Block a user