ZeroZero Game Engine
v0.0
A 3D game engine using Vulkan & Jolt
|
Simple albedo/specular/normal material
Classes | |
struct | TextureInfo |
Public Member Functions | |
StandardMaterial (const string &name="StandardMaterial") | |
const auto & | getAlbedoColor () const |
void | setAlbedoColor (const vec4 &color) |
const auto & | getAlbedoTexture () const |
void | setAlbedoTexture (const TextureInfo &texture) |
const auto & | getNormalTexture () const |
void | setNormalTexture (const TextureInfo &texture) |
auto | getMetallicFactor () const |
void | setMetallicFactor (float metallic) |
const auto & | getMetallicTexture () const |
void | setMetallicTexture (const TextureInfo &texture) |
float | getRoughnessFactor () const |
void | setRoughnessFactor (float roughness) |
const auto & | getRoughnessTexture () const |
void | setRoughnessTexture (const TextureInfo &texture) |
const auto & | getEmissiveTexture () const |
vec3 | getEmissiveFactor () const |
void | setEmissiveFactor (const vec3 &emissive) |
void | setEmissiveTexture (const TextureInfo &texture) |
auto | getEmissiveStrength () const |
void | setEmissiveStrength (float emissive) |
auto | getNormalScale () const |
void | setNormalScale (float scale) |
![]() | |
auto | getCullMode () const |
void | setCullMode (const CullMode mode) |
auto | getTransparency () const |
void | setTransparency (const Transparency transparencyMode) |
auto | getAlphaScissor () const |
void | setAlphaScissor (const float scissor) |
![]() | |
auto | getId () const |
const auto & | getName () const |
string | toString () const override |
virtual shared_ptr< Resource > | duplicate () const |
![]() | |
void | connect (const Signal::signal &name, const Signal::Handler &handler) |
void | connect (const Signal::signal &name, const function< void ()> &handler) |
void | emit (const Signal::signal &name, void *params=nullptr) |
|
explicit |
Creates a StandardMaterial with default parameters
|
nodiscardinline |
Returns the material's base color.
|
nodiscardinline |
Returns the albedo texture (texture to multiply by albedo color. Used for basic texturing of objects).
|
nodiscardinline |
Return the emmisive colors factor
|
nodiscardinline |
Returns the emmisibe colors strength
|
nodiscardinline |
Returns the emmisive colors image texture
|
nodiscardinline |
Returns the metallic factor
|
nodiscardinline |
Return the metallic image texture. Only the BLUE channel is used by the default shader.
|
nodiscardinline |
Returns the scale applied to the normal image texture. See https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_material_normaltextureinfo_scale
|
nodiscardinline |
Return the normal texture
|
nodiscardinline |
Returns the roughness factor
|
nodiscardinline |
Returns the roughness image texture. Only the RED channel is used by the default shader.
|
inline |
Sets the material's base color.
void setAlbedoTexture | ( | const TextureInfo & | texture | ) |
Sets the albedo texture (texture to multiply by albedo color. Used for basic texturing of objects).
void setEmissiveFactor | ( | const vec3 & | emissive | ) |
Sets the emmisive colors factore
void setEmissiveStrength | ( | float | emissive | ) |
Sets the emmisibe colors strength
void setEmissiveTexture | ( | const TextureInfo & | texture | ) |
Sets the emmisive colors image texture. Used as a linear RGB texture by the default shader.
void setMetallicFactor | ( | float | metallic | ) |
Sets the metallic factor
void setMetallicTexture | ( | const TextureInfo & | texture | ) |
Sets the metallic image texture. Only the BLUE channel is used by the default shader.
void setNormalScale | ( | float | scale | ) |
Sets the scale applied to the normal image texture. See https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_material_normaltextureinfo_scale
void setNormalTexture | ( | const TextureInfo & | texture | ) |
Sets the normal texture
void setRoughnessFactor | ( | float | roughness | ) |
Sets the roughness factor
void setRoughnessTexture | ( | const TextureInfo & | texture | ) |
Sets the roughness image texture. Only the RED channel is used by the default shader.