Skip to content
Snippets Groups Projects
Commit 87ecaf0c authored by Mathias Paulin's avatar Mathias Paulin :speech_balloon:
Browse files

Fix Point cloud parameter provider for custom pass

parent 39bade97
Branches
No related tags found
No related merge requests found
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment