molecular
|
Texture splatting. Mostly useful for terrain. More...
#include <TextureSplatting.h>
Public Member Functions | |
template<class TRenderManager > | |
TextureSplatting (TRenderManager &manager) | |
void | Execute () override |
void | SetTextureScale (float scale) |
void | SetSplattingMap (unsigned int index, RenderCmdSink::Texture *map, unsigned int components=4) |
RenderCmdSink::Texture * | GetSplattingMapTexture (unsigned int index) |
unsigned int | GetSplattingMapComponents (unsigned int index) |
void | SetTexture (unsigned int index, Hash texture) |
![]() | |
template<class TRenderManager > | |
SingleCalleeRenderFunction (TRenderManager &manager) | |
SingleCalleeRenderFunction (Scoping &scoping, RenderCmdSink &renderer) | |
util::AxisAlignedBox | GetBounds () const override |
bool | BoundsChangedSince (int framecounter) const override |
void | SetCallee (RenderFunction *callee) |
![]() | |
template<class TRenderManager > | |
RenderFunction (TRenderManager &manager) | |
RenderFunction (Scoping &scoping, RenderCmdSink &renderer) | |
virtual | ~RenderFunction () |
virtual void | Set (Hash, bool) |
Set bool property with given name. More... | |
Static Public Attributes | |
static const unsigned int | kMaxSplattingMaps = 2 |
static const unsigned int | kMaxTextures = kMaxSplattingMaps * 4 |
Additional Inherited Members | |
![]() | |
template<class T > | |
const T * | GetVariable (Hash key) |
Convenience shortcut to a variable pointer from the dynamic scope. More... | |
![]() | |
RenderFunction * | mCallee = nullptr |
![]() | |
Scoping & | mScoping |
RenderCmdSink & | mRenderer |
Texture splatting. Mostly useful for terrain.
Blends high-resolution detail textures according to the component values of low-resolution splatting maps. See https://en.wikipedia.org/wiki/Texture_splatting for more information.
Supports up to kMaxSplattingMaps splatting maps, each with four components.
|
inline |
|
overridevirtual |
Implements molecular::gfx::RenderFunction.
|
inline |
|
inline |
void molecular::gfx::TextureSplatting::SetSplattingMap | ( | unsigned int | index, |
RenderCmdSink::Texture * | map, | ||
unsigned int | components = 4 |
||
) |
void molecular::gfx::TextureSplatting::SetTexture | ( | unsigned int | index, |
Hash | texture | ||
) |
|
inline |
|
static |
|
static |