Set transparency attenuation to %45 + 2%/m.

This commit is contained in:
Sascha L. Teichmann 2014-10-26 23:53:58 +01:00
parent f5d84f0b7b
commit f3ed470d57

View File

@ -115,8 +115,8 @@ func (colors *Colors) BlendColors(span *Span, col color.RGBA, pos int32) color.R
}
const scale = float32(1) / float32(100)
for ; curr != nil; curr = curr.Next {
// At least 35% attenuation + 5% extra for each depth meter.
factor := float32(min(100, 35+(curr.To-curr.From)*5)) * scale
// At least 45% attenuation + 2% extra for each depth meter.
factor := float32(min(100, 45+(curr.To-curr.From)*2)) * scale
col = BlendColor(colors.Colors[curr.Value], col, factor)
}
return col