reflection added
This commit is contained in:
parent
6fc7d7a4c3
commit
a6770d7fac
3 changed files with 24 additions and 6 deletions
|
|
@ -62,7 +62,7 @@ func MixMat(mat1 MaterialBrut, mat2 MaterialBrut, t float64, p Vector3) Material
|
|||
mat1.specularColor.GetColor(p).Scale(1 - t).Add((mat2.specularColor.GetColor(p)).Scale(t)),
|
||||
mat1.specularFac*(1-t) + mat2.specularFac*t,
|
||||
mat1.specularExp*(1-t) + mat2.specularExp*t,
|
||||
(mat1.reflectanceFac*(1-t) + mat2.reflectanceFac) * t,
|
||||
mat1.reflectanceFac*(1-t) + mat2.reflectanceFac*t,
|
||||
mat1.reflectanceTint.GetColor(p).Scale(1 - t).Add((mat2.reflectanceTint.GetColor(p)).Scale(t)),
|
||||
mat1.refractFac*(1-t) + mat2.refractFac*t,
|
||||
mat1.refractIndice*(1-t) + mat2.refractIndice*t,
|
||||
|
|
@ -88,7 +88,7 @@ func DefaultMaterial(diffuseColor Color) MaterialBrut {
|
|||
specularColor: Vector3{255, 255, 255},
|
||||
specularFac: 1,
|
||||
specularExp: 35.0,
|
||||
reflectanceFac: 0.0,
|
||||
reflectanceFac: 0.2,
|
||||
reflectanceTint: Vector3{255, 255, 255},
|
||||
refractFac: 0.0,
|
||||
refractIndice: 1.0,
|
||||
|
|
@ -97,7 +97,7 @@ func DefaultMaterial(diffuseColor Color) MaterialBrut {
|
|||
|
||||
// Colors
|
||||
|
||||
var RED = Vector3{255, 0, 0}
|
||||
var RED = Vector3{125, 0, 0}
|
||||
var GREEN = Vector3{0, 255, 0}
|
||||
var BLUE = Vector3{0, 0, 255}
|
||||
var WHITE = Vector3{255, 255, 255}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue