diff --git a/src/libRender/RadiumNBR/Passes/CustomAttribToColorPass.cpp b/src/libRender/RadiumNBR/Passes/CustomAttribToColorPass.cpp index fd42a9732899b7187ebaac95122d15c5c7ea2377..911902a28296ec6a748cce4a44df8dfd8799f686 100644 --- a/src/libRender/RadiumNBR/Passes/CustomAttribToColorPass.cpp +++ b/src/libRender/RadiumNBR/Passes/CustomAttribToColorPass.cpp @@ -186,8 +186,15 @@ bool CustomAttribToColorPass::buildRenderTechnique( {"CustomAtt2ClrPass::CustomColorProgram" + ro->getName()} ) ) { rt.setConfiguration( *cfg, passIndex() ); - // TODO : is this really usefull ? - rt.setParametersProvider( mat, passIndex() ); + std::shared_ptr<Ra::Engine::Data::ShaderParameterProvider> paramProvider = mat; + auto pointCloudConst = + dynamic_cast<const Ra::Engine::Scene::PointCloudComponent*>( ro->getComponent() ); + auto pointCloud = const_cast<Ra::Engine::Scene::PointCloudComponent*>( pointCloudConst ); + if ( pointCloud ) + { + paramProvider = std::make_shared<PointCloudParameterProvider>( mat, pointCloud ); + } + rt.setParametersProvider( paramProvider, passIndex() ); } else { @@ -370,7 +377,6 @@ bool CustomAttribToColorPass::buildRenderTechnique( geometryShadersource + m_customGeometryAttrib ); // construct the parameter provider for the technique paramProvider = std::make_shared<PointCloudParameterProvider>( mat, pointCloud ); - pointCloud->setSplatSize( 0.025 ); } // Add to the ShaderConfigManager Ra::Engine::Data::ShaderConfigurationFactory::addConfiguration( theConfig );