mercator
0.4.0
A terrain generation library for the Worldforge system.
|
5 #ifndef MERCATOR_FILL_GRASS_SHADER_H
6 #define MERCATOR_FILL_GRASS_SHADER_H
55 float m_highThreshold;
67 ColorT slopeToAlpha(
float height,
float slope)
const;
108 float cutoff()
const {
return m_cutoff; }
118 #endif // MERCATOR_FILL_GRASS_SHADER_H
float highThreshold() const
Accessor for level below which the shader renders.
GrassShader(float lowThreshold=default_lowThreshold, float highThreshold=default_highThreshold, float cutoff=default_cutoff, float intercept=default_intercept)
Constructor.
float cutoff() const
Accessor for slope below which grass is opaque.
static const float default_intercept
Default slope steeper than which no grass grows.
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Data store for terrain surface data.
float lowThreshold() const
Accessor for level above which the shader renders.
static const float default_cutoff
Default slope below which grass is opaque.
static const float default_highThreshold
Default level below which the shader renders.
bool checkIntersect(const Segment &) const override
Check whether this Shader has any effect on the given Segment.
static const std::string key_lowThreshold
Key string used when specifying the low threshold parameter.
static const float default_lowThreshold
Default level above which the shader renders.
void shade(Surface &) const override
Populate a Surface with data.
static const std::string key_cutoff
Key string used when specifying the cutoff parameter.
Base class for Shader objects which create surface data for use when rendering terrain.
float intercept() const
Accessor for slope steeper than which no grass grows.
static const std::string key_intercept
Key string used when specifying the intercept parameter.
Shader for adding grass to the terrain.
static const std::string key_highThreshold
Key string used when specifying the high threshold parameter.
std::map< std::string, float > Parameters
STL map of parameter values for a shader constructor.