phong.go 468 B

123456789101112131415161718192021
  1. // Copyright 2016 The G3N Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package material
  5. import (
  6. "github.com/g3n/engine/math32"
  7. )
  8. type Phong struct {
  9. Standard // Embedded standard material
  10. }
  11. // NewPhong creates and returns a pointer to a new phong material
  12. func NewPhong(color *math32.Color) *Phong {
  13. pm := new(Phong)
  14. pm.Standard.Init("shaderPhong", color)
  15. return pm
  16. }