Documentation
¶
Index ¶
- Constants
- func BindDiffuse(program *ShaderProgram, material *Material, uaMaterial string) error
- func BindEmissive(program *ShaderProgram, material *Material, uaMaterial string) error
- func BindNormals(program *ShaderProgram, material *Material, uaMaterial string) error
- func BindShininess(program *ShaderProgram, material *Material, uaMaterial string) error
- func BindSpecular(program *ShaderProgram, material *Material, uaMaterial string) error
- type BlendMaterial
- type IMaterial
- type Material
- type ShaderProgram
Constants ¶
View Source
const (
BlendMap Texture.Type = "blendMap"
)
Variables ¶
This section is empty.
Functions ¶
func BindDiffuse ¶
func BindDiffuse(program *ShaderProgram, material *Material, uaMaterial string) error
func BindEmissive ¶
func BindEmissive(program *ShaderProgram, material *Material, uaMaterial string) error
func BindNormals ¶
func BindNormals(program *ShaderProgram, material *Material, uaMaterial string) error
func BindShininess ¶
func BindShininess(program *ShaderProgram, material *Material, uaMaterial string) error
func BindSpecular ¶
func BindSpecular(program *ShaderProgram, material *Material, uaMaterial string) error
Types ¶
type BlendMaterial ¶
type BlendMaterial struct {
BlendMap *Texture.Texture2D `yaml:"blendMap"`
Materials [4]Material `yaml:"materials"`
}
func (*BlendMaterial) GenerateMibMaps ¶
func (blendMap *BlendMaterial) GenerateMibMaps(lodBias float32)
func (*BlendMaterial) SetWrapMode ¶
func (blendMap *BlendMaterial) SetWrapMode(mode Texture.WrapMode)
func (*BlendMaterial) Unbind ¶
func (blendMap *BlendMaterial) Unbind()
func (*BlendMaterial) UnmarshalYAML ¶
func (blendMap *BlendMaterial) UnmarshalYAML(value *yaml.Node) error
type Material ¶
type Material struct {
DiffuseBaseColor GeometryMath.Vector4 `yaml:"diffuseBaseColor"`
SpecularBaseColor GeometryMath.Vector3 `yaml:"specularBaseColor"`
EmissiveBaseColor GeometryMath.Vector3 `yaml:"emissiveBaseColor"`
Shininess float32 `yaml:"shininess"`
Textures struct {
Diffuse *Texture.Texture2D `yaml:"diffuse"`
Specular *Texture.Texture2D `yaml:"specular"`
Emissive *Texture.Texture2D `yaml:"emissive"`
Normal *Texture.Texture2D `yaml:"normal"`
} `yaml:"textures"`
UvScale float32 `yaml:"uvScale"`
LodBias float32 `yaml:"lodBias"`
}
func (*Material) GenerateMibMaps ¶
func (*Material) SetWrapMode ¶
type ShaderProgram ¶
type ShaderProgram struct {
*Shader.ShaderProgramCore
BindFunctions []func(program *ShaderProgram, material *Material, materialUniformAddress string) error
}
func (*ShaderProgram) BindObject ¶
func (program *ShaderProgram) BindObject(i interface{}) error
func (*ShaderProgram) GetUniformAddress ¶
func (program *ShaderProgram) GetUniformAddress(i interface{}) (string, error)
Click to show internal directories.
Click to hide internal directories.