nothing important
This commit is contained in:
parent
2e6f0a0730
commit
264a759ac5
3 changed files with 26 additions and 13 deletions
|
|
@ -5,6 +5,14 @@ import "math"
|
|||
type Color interface {
|
||||
GetColor(Vector3) Vector3
|
||||
}
|
||||
type ScaledColor struct {
|
||||
color Color
|
||||
scale float64
|
||||
}
|
||||
|
||||
func (sColor ScaledColor) GetColor(p Vector3) Vector3 {
|
||||
return sColor.color.GetColor(p).Scale(sColor.scale)
|
||||
}
|
||||
|
||||
type GridColor struct {
|
||||
color1 Color
|
||||
|
|
@ -39,7 +47,7 @@ type Material struct {
|
|||
|
||||
func DefaultMaterial(diffuseColor Color) Material {
|
||||
return Material{
|
||||
ambiantColor: Vector3{0, 0, 0},
|
||||
ambiantColor: ScaledColor{diffuseColor, 0.2},
|
||||
diffuseColor: diffuseColor,
|
||||
diffuseFac: 1,
|
||||
specularColor: Vector3{255, 255, 255},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue