Public Member Functions | Protected Attributes

sp::video::TextureLayerRelief Class Reference
[Texture Mapping]

#include <spTextureLayerRelief.hpp>

Inheritance diagram for sp::video::TextureLayerRelief:
sp::video::TextureLayer

List of all members.

Public Member Functions

 TextureLayerRelief ()
virtual ~TextureLayerRelief ()
void setReliefEnable (bool Enable)
 Enables or disables relief mapping. By default disabled.
bool getReliefEnable () const
 Returns true if relief mapping is enabled. By default disabled.
void setMinSamples (s32 MinSamples)
s32 getMinSamples () const
 Returns the count of minimal samples. By default 0.
void setMaxSamples (s32 MaxSamples)
s32 getMaxSamples () const
 Returns the count of maximal samples. By default 50.
void setHeightMapScale (f32 HeightMapScale)
 Sets the height-map scale factor.
f32 getHeightMapScale () const
 Returns the height-map scale factor. By default 0.015.
void setViewRange (f32 ViewRange)
f32 getViewRange () const
 Returns the view range. By default 2.0.

Protected Attributes

bool ReliefEnabled_
s32 MinSamples_
s32 MaxSamples_
f32 HeightMapScale_
f32 ViewRange_

Detailed Description

Relief (or rather parllax-occlusion) texture layer class. Particular used for deferred-renderer.

Note:
Realize that relief-mapping is a performance killer! But it looks really nice :-). The problem with relief-mapping is, that you have both: lots of texture lookups in the shader, and "dynamic-branching". These two effects are very time consuming also for moddern graphics hardware.
See also:
DeferredRenderer
Since:
Version 3.2

Constructor & Destructor Documentation

sp::video::TextureLayerRelief::TextureLayerRelief (  ) 
sp::video::TextureLayerRelief::~TextureLayerRelief (  )  [virtual]

Member Function Documentation

f32 sp::video::TextureLayerRelief::getHeightMapScale (  )  const [inline]

Returns the height-map scale factor. By default 0.015.

s32 sp::video::TextureLayerRelief::getMaxSamples (  )  const [inline]

Returns the count of maximal samples. By default 50.

s32 sp::video::TextureLayerRelief::getMinSamples (  )  const [inline]

Returns the count of minimal samples. By default 0.

bool sp::video::TextureLayerRelief::getReliefEnable (  )  const [inline]

Returns true if relief mapping is enabled. By default disabled.

f32 sp::video::TextureLayerRelief::getViewRange (  )  const [inline]

Returns the view range. By default 2.0.

void sp::video::TextureLayerRelief::setHeightMapScale ( f32  HeightMapScale  )  [inline]

Sets the height-map scale factor.

void sp::video::TextureLayerRelief::setMaxSamples ( s32  MaxSamples  )  [inline]

Sets the maximal sample count. This is used when the view camera is near to the surface and relief mapping produces nice graphics.

Parameters:
[in] MaxSamples Specifies the count of minimal samples. By default 50.
void sp::video::TextureLayerRelief::setMinSamples ( s32  MinSamples  )  [inline]

Sets the minimal sample count. This is used when the view camera is far away from the surface and relief mapping would be an overkill.

Parameters:
[in] MinSamples Specifies the count of minimal samples. By default 0.
void sp::video::TextureLayerRelief::setReliefEnable ( bool  Enable  )  [inline]

Enables or disables relief mapping. By default disabled.

void sp::video::TextureLayerRelief::setViewRange ( f32  ViewRange  )  [inline]

Sets the view range. This indicates how quickly the quality decreaes when the camera move away from the surface.

Parameters:
[in] ViewRange Specifies the view range. The greater the view range, the better the quality - and lower the performance ;-)

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines