A material that appears in one single color and is unaffected by lights.
More...
#include <SolidColor.hpp>
|
| | SolidColor (Color _color) |
| | Creates a new solid color material.
|
| |
| Vector4 | vertexShader (const Uniforms &uniforms, const Attributes &attributes) override |
| | The vertex shader of this material, which will be run for every vertex of the mesh's geometry.
|
| |
| Color | fragmentShader (const Uniforms &uniforms, const Varyings &varyings, const std::vector< std::reference_wrapper< Light > > &lights) override |
| | The fragment shader of this material, which will be run for every fragment that the mesh covers on the screen to determine its color.
|
| |
|
|
Color | color |
| | The color of this material.
|
| |
| CullMode | cullMode |
| | The face to cull (not draw) in the render.
|
| |
| bool | depthTest = true |
| | Whether or not to perform the depth test.
|
| |
|
bool | depthWrite = true |
| | Whether or not to write the depth of the object to the depth texture.
|
| |
A material that appears in one single color and is unaffected by lights.
◆ SolidColor()
| t::SolidColor::SolidColor |
( |
Color | _color | ) |
|
|
inlineexplicit |
Creates a new solid color material.
- Parameters
-
| _color | The color of the new material. |
◆ fragmentShader()
| Color t::SolidColor::fragmentShader |
( |
const Uniforms & | uniforms, |
|
|
const Varyings & | varyings, |
|
|
const std::vector< std::reference_wrapper< Light > > & | lights ) |
|
inlineoverridevirtual |
The fragment shader of this material, which will be run for every fragment that the mesh covers on the screen to determine its color.
- Parameters
-
| uniforms | The uniforms. |
| varyings | The varyings. |
| lights | The list of lights in the scene. |
- Returns
- The color of the fragment this shader is invoked on.
- See also
- Fragment
Implements t::Material.
◆ vertexShader()
The vertex shader of this material, which will be run for every vertex of the mesh's geometry.
- Parameters
-
| uniforms | The uniforms. |
| attributes | The attributes of the vertex. |
- Returns
- The transformed vertex's position in homogeneous coordinates, usually in normalized device coordinates (NDC).
Implements t::Material.
The documentation for this class was generated from the following file: