17 PBRMaterialProperties::PBRMaterialProperties()
43 if (this->baseColorTexture !=
nullptr) this->baseColorTexture->
releaseReference();
61 if (this->metallicRoughnessTexture !=
nullptr) this->metallicRoughnessTexture->
releaseReference();
93 if (this->emissiveTexture !=
nullptr) this->emissiveTexture->
releaseReference();
109 auto baseColorTextureMaskedTransparencyTest =
true;
113 auto alpha = textureData.
get(i * 4 + 3);
115 if (alpha > 5 || alpha < 250) baseColorTextureMaskedTransparencyTest =
false;
Color 4 definition class.
void set(float r, float g, float b, float a)
Sets this color by its components.
ByteBuffer getRGBTextureData()
uint8_t getRGBDepthBitsPerPixel() const
const string & getId() const
uint16_t getTextureHeight() const
uint16_t getTextureWidth() const
Represents specular material properties.
void setBaseColorTexture(Texture *baseColorTexture)
Set up a base color texture by the texture itself.
string normalTexturePathName
Texture * baseColorTexture
float baseColorTextureMaskedTransparencyThreshold
void setEmissiveTexture(Texture *emissiveTexture)
Set up a emissive texture by the texture itself.
string emissiveTextureFileName
string emissiveTexturePathName
Texture * metallicRoughnessTexture
string baseColorTextureFileName
~PBRMaterialProperties()
Destructor.
string metallicRoughnessTexturePathName
bool baseColorTextureTransparency
void setMetallicRoughnessTexture(Texture *metallicRoughnessTexture)
Set up a metallic roughness texture by the texture itself.
bool baseColorTextureMaskedTransparency
Texture * emissiveTexture
string normalTextureFileName
string metallicRoughnessTextureFileName
void setNormalTexture(Texture *normalTexture)
Set up a normal texture by the texture itself.
string baseColorTexturePathName
void checkBaseColorTextureTransparency()
Checks and set ups base color texture transparency.
uint8_t get(int64_t position) const
virtual void releaseReference()
Releases a reference, thus decrementing the counter and delete it if reference counter is zero.