2x Perf, because wtf *Material is useless, Material is an interface so it's already a ref
This commit is contained in:
parent
a6a3785a9f
commit
0ded879dce
4 changed files with 26 additions and 25 deletions
|
|
@ -70,14 +70,14 @@ func MixMat(mat1 MaterialBrut, mat2 MaterialBrut, t float64, p Vector3) Material
|
|||
}
|
||||
|
||||
type MixedMaterial struct {
|
||||
mat1 *Material
|
||||
mat2 *Material
|
||||
mat1 Material
|
||||
mat2 Material
|
||||
t float64
|
||||
p Vector3
|
||||
}
|
||||
|
||||
func (mixedMat MixedMaterial) GetMaterialBrut() MaterialBrut {
|
||||
return MixMat((*mixedMat.mat1).GetMaterialBrut(), (*mixedMat.mat2).GetMaterialBrut(), mixedMat.t, mixedMat.p)
|
||||
return MixMat((mixedMat.mat1).GetMaterialBrut(), (mixedMat.mat2).GetMaterialBrut(), mixedMat.t, mixedMat.p)
|
||||
}
|
||||
|
||||
func DefaultMaterial(diffuseColor Color) MaterialBrut {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue