mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-07-14 14:00:29 +02:00
Add a -transparent-dim=percent flag to set the extra dimming of transparent materials each depth meter.
This commit is contained in:
@ -27,6 +27,7 @@ func main() {
|
||||
shaded bool
|
||||
transparent bool
|
||||
cpuProfile string
|
||||
transparentDim float64
|
||||
)
|
||||
|
||||
flag.IntVar(&port, "port", 6379, "port to of mtredisalize server")
|
||||
@ -46,6 +47,9 @@ func main() {
|
||||
flag.StringVar(&outfile, "o", "out.png", "image file of result (shorthand)")
|
||||
flag.BoolVar(&shaded, "shaded", true, "draw relief")
|
||||
flag.BoolVar(&transparent, "transparent", false, "render transparent blocks")
|
||||
flag.Float64Var(
|
||||
&transparentDim, "transparent-dim", common.DefaultTransparentDim*100,
|
||||
"Extra dimming of transparent nodes every depth meter in percent (0-100).")
|
||||
flag.StringVar(&cpuProfile, "cpuprofile", "", "write cpu profile to file")
|
||||
|
||||
flag.Parse()
|
||||
@ -66,6 +70,9 @@ func main() {
|
||||
log.Fatalf("Cannot open color file: %s", err)
|
||||
}
|
||||
|
||||
colors.TransparentDim = common.Clamp32f(
|
||||
float32(transparentDim/100.0), 0.0, 100.0)
|
||||
|
||||
address := fmt.Sprintf("%s:%d", host, port)
|
||||
|
||||
var client *common.RedisClient
|
||||
|
Reference in New Issue
Block a user