Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::video::SMaterialLayer Class Reference

Struct for holding material parameters which exist per texture layer. More...

#include <nirtcpp/core/engine/SMaterialLayer.hpp>

Collaboration diagram for nirt::video::SMaterialLayer:
Collaboration graph

Public Member Functions

 SMaterialLayer ()
 Default constructor.
 
 SMaterialLayer (const SMaterialLayer &other)
 Copy constructor.
 
 ~SMaterialLayer ()
 Destructor.
 
SMaterialLayeroperator= (const SMaterialLayer &other)
 Assignment operator.
 
core::matrix4getTextureMatrix ()
 Gets the texture transformation matrix.
 
const core::matrix4getTextureMatrix () const
 Gets the immutable texture transformation matrix.
 
void setTextureMatrix (const core::matrix4 &mat)
 Sets the texture transformation matrix to mat.
 
bool operator!= (const SMaterialLayer &b) const
 Inequality operator.
 
bool operator== (const SMaterialLayer &b) const
 Equality operator.
 

Public Attributes

ITextureTexture
 Texture.
 
u8 TextureWrapU:4
 Texture Clamp Mode.
 
u8 TextureWrapV:4
 
u8 TextureWrapW:4
 
bool BilinearFilter:1
 Is bilinear filtering enabled? Default: true.
 
bool TrilinearFilter:1
 Is trilinear filtering enabled? Default: false.
 
u8 AnisotropicFilter
 Is anisotropic filtering enabled? Default: 0, disabled.
 
s8 LODBias
 Bias for the mipmap choosing decision.
 

Friends

class SMaterial
 

Detailed Description

Struct for holding material parameters which exist per texture layer.

Constructor & Destructor Documentation

◆ SMaterialLayer()

nirt::video::SMaterialLayer::SMaterialLayer ( const SMaterialLayer other)
inline

Copy constructor.

Parameters
otherMaterial layer to copy from.

Member Function Documentation

◆ getTextureMatrix() [1/2]

core::matrix4 & nirt::video::SMaterialLayer::getTextureMatrix ( )
inline

Gets the texture transformation matrix.

Returns
Texture matrix of this layer.

◆ getTextureMatrix() [2/2]

const core::matrix4 & nirt::video::SMaterialLayer::getTextureMatrix ( ) const
inline

Gets the immutable texture transformation matrix.

Returns
Texture matrix of this layer.

◆ operator!=()

bool nirt::video::SMaterialLayer::operator!= ( const SMaterialLayer b) const
inline

Inequality operator.

Parameters
bLayer to compare to.
Returns
True if layers are different, else false.

◆ operator=()

SMaterialLayer & nirt::video::SMaterialLayer::operator= ( const SMaterialLayer other)
inline

Assignment operator.

Parameters
otherMaterial layer to copy from.
Returns
This material layer, updated.

◆ operator==()

bool nirt::video::SMaterialLayer::operator== ( const SMaterialLayer b) const
inline

Equality operator.

Parameters
bLayer to compare to.
Returns
True if layers are equal, else false.

◆ setTextureMatrix()

void nirt::video::SMaterialLayer::setTextureMatrix ( const core::matrix4 mat)
inline

Sets the texture transformation matrix to mat.

NOTE: Pipelines can ignore this matrix when the texture is 0.

Parameters
matNew texture matrix for this layer.

Member Data Documentation

◆ AnisotropicFilter

u8 nirt::video::SMaterialLayer::AnisotropicFilter

Is anisotropic filtering enabled? Default: 0, disabled.

In Nirtcpp you can use anisotropic texture filtering in conjunction with bilinear or trilinear texture filtering to improve rendering results. Primitives will look less blurry with this flag switched on. The number gives the maximal anisotropy degree, and is often in the range 2-16. Value 1 is equivalent to 0, but should be avoided.

◆ LODBias

s8 nirt::video::SMaterialLayer::LODBias

Bias for the mipmap choosing decision.

This value can make the textures more or less blurry than with the default value of 0. The value (divided by 8.f) is added to the mipmap level chosen initially, and thus takes a smaller mipmap for a region if the value is positive.

◆ TextureWrapU

u8 nirt::video::SMaterialLayer::TextureWrapU

Texture Clamp Mode.

Values are taken from E_TEXTURE_CLAMP.

◆ TrilinearFilter

bool nirt::video::SMaterialLayer::TrilinearFilter

Is trilinear filtering enabled? Default: false.

If the trilinear filter flag is enabled, the bilinear filtering flag is ignored.


The documentation for this class was generated from the following file:

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print