molecular
Classes | Public Member Functions | Static Public Attributes | List of all members
molecular::gfx::TextureSplatting Class Reference

Texture splatting. Mostly useful for terrain. More...

#include <TextureSplatting.h>

Inheritance diagram for molecular::gfx::TextureSplatting:
molecular::gfx::SingleCalleeRenderFunction molecular::gfx::RenderFunction

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::TextureGetSplattingMapTexture (unsigned int index)
 
unsigned int GetSplattingMapComponents (unsigned int index)
 
void SetTexture (unsigned int index, Hash texture)
 
- Public Member Functions inherited from molecular::gfx::SingleCalleeRenderFunction
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)
 
- Public Member Functions inherited from molecular::gfx::RenderFunction
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

- Protected Member Functions inherited from molecular::gfx::RenderFunction
template<class T >
const T * GetVariable (Hash key)
 Convenience shortcut to a variable pointer from the dynamic scope. More...
 
- Protected Attributes inherited from molecular::gfx::SingleCalleeRenderFunction
RenderFunctionmCallee = nullptr
 
- Protected Attributes inherited from molecular::gfx::RenderFunction
ScopingmScoping
 
RenderCmdSinkmRenderer
 

Detailed Description

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.

Constructor & Destructor Documentation

template<class TRenderManager >
molecular::gfx::TextureSplatting::TextureSplatting ( TRenderManager &  manager)
inline

Member Function Documentation

void molecular::gfx::TextureSplatting::Execute ( )
overridevirtual
unsigned int molecular::gfx::TextureSplatting::GetSplattingMapComponents ( unsigned int  index)
inline
RenderCmdSink::Texture* molecular::gfx::TextureSplatting::GetSplattingMapTexture ( unsigned int  index)
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 
)
void molecular::gfx::TextureSplatting::SetTextureScale ( float  scale)
inline

Member Data Documentation

const unsigned int molecular::gfx::TextureSplatting::kMaxSplattingMaps = 2
static
const unsigned int molecular::gfx::TextureSplatting::kMaxTextures = kMaxSplattingMaps * 4
static

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