SetBaseColorMap sets this material optional texture base color. Returns pointer to this updated material.
(tex *texture.Texture2D)
| 87 | // SetBaseColorMap sets this material optional texture base color. |
| 88 | // Returns pointer to this updated material. |
| 89 | func (m *Physical) SetBaseColorMap(tex *texture.Texture2D) *Physical { |
| 90 | |
| 91 | m.baseColorTex = tex |
| 92 | if m.baseColorTex != nil { |
| 93 | m.baseColorTex.SetUniformNames("uBaseColorSampler", "uBaseColorTexParams") |
| 94 | m.ShaderDefines.Set("HAS_BASECOLORMAP", "") |
| 95 | m.AddTexture(m.baseColorTex) |
| 96 | } else { |
| 97 | m.ShaderDefines.Unset("HAS_BASECOLORMAP") |
| 98 | m.RemoveTexture(m.baseColorTex) |
| 99 | } |
| 100 | return m |
| 101 | } |
| 102 | |
| 103 | // SetMetallicRoughnessMap sets this material optional metallic-roughness texture. |
| 104 | // Returns pointer to this updated material. |
no test coverage detected