Exposed dust parameters to UI

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%40165
This commit is contained in:
kearwood
2012-11-23 01:13:35 +00:00
parent 96a9c02a13
commit b2c79149b1
4 changed files with 31 additions and 13 deletions

View File

@@ -164,12 +164,12 @@ void KRLight::render(KRCamera *pCamera, std::vector<KRLight *> &lights, const KR
KRNode::render(pCamera, lights, viewport, renderPass);
if(renderPass == KRNode::RENDER_PASS_GENERATE_SHADOWMAPS && (pCamera->volumetric_environment_enable || (pCamera->m_cShadowBuffers > 0 && m_casts_shadow))) {
if(renderPass == KRNode::RENDER_PASS_GENERATE_SHADOWMAPS && (pCamera->volumetric_environment_enable || pCamera->dust_particle_enable || (pCamera->m_cShadowBuffers > 0 && m_casts_shadow))) {
allocateShadowBuffers(configureShadowBufferViewports(viewport));
renderShadowBuffers(pCamera);
}
if(renderPass == KRNode::RENDER_PASS_ADDITIVE_PARTICLES) {
if(renderPass == KRNode::RENDER_PASS_ADDITIVE_PARTICLES && pCamera->dust_particle_enable) {
// Render brownian particles for dust floating in air
if(m_cShadowBuffers >= 1 && shadowValid[0] && m_dust_particle_density > 0.0f && m_dust_particle_size > 0.0f && m_dust_particle_intensity > 0.0f) {
float lod_coverage = getBounds().coverage(viewport.getViewProjectionMatrix(), viewport.getSize()); // This also checks the view frustrum culling