}
const Extensions* extensions = getExtensions(state.getContextID(),true);
- GLfloat ua1[3] = { (GLfloat) 1.0f,
+ GLfloat ua1[3] = { (GLfloat) alpha_factor,
(GLfloat) shade_factor,
(GLfloat) cloud_height };
GLfloat ua2[3] = { (GLfloat) bottom_factor,
setUseDisplayList(false);
}
- CloudShaderGeometry(int vx, int vy, float width, float height, float ts, float ms, float bs, float shade, float ch, float zsc) :
- varieties_x(vx), varieties_y(vy), top_factor(ts), middle_factor(ms), bottom_factor(bs), shade_factor(shade), cloud_height(ch), zscale(zsc)
+ CloudShaderGeometry(int vx, int vy, float width, float height, float ts, float ms, float bs, float shade, float ch, float zsc, float af) :
+ varieties_x(vx), varieties_y(vy), top_factor(ts), middle_factor(ms),
+ bottom_factor(bs), shade_factor(shade), cloud_height(ch), zscale(zsc),
+ alpha_factor(af)
{
setUseDisplayList(false);
float x = width/2.0f;
float shade_factor;
float cloud_height;
float zscale;
+ float alpha_factor;
// Bounding box extents.
osg::BoundingBox _bbox;
max_shade_lighting_factor = cld_def->getFloatValue("max-shade-lighting-factor", min(min_shade_lighting_factor + 0.1, 1.0));
zscale = cld_def->getFloatValue("z-scale", 1.0);
+ alpha_factor = cld_def->getFloatValue("alpha-factor",1.0);
texture = cld_def->getStringValue("texture", "cl_cumulus.png");
// Create a new Effect for the texture, if required.
bottom_factor,
shade_factor,
height,
- zscale);
+ zscale,
+ alpha_factor);
// Determine the cull distance. This is used to remove sprites that are too close together.
// The value is squared as we use vector calculations.