Unsolved Removing Qt3D's default point light
-
-
Qt3D add a light is the list of ligth is empty:
if (activeLightSources.isEmpty()) { setUniformValue(command->m_parameterPack, LIGHT_POSITION_NAMES[0], QVector3D(10.0f, 10.0f, 0.0f)); setUniformValue(command->m_parameterPack, LIGHT_TYPE_NAMES[0], int(QAbstractLight::PointLight)); setUniformValue(command->m_parameterPack, LIGHT_COLOR_NAMES[0], QVector3D(1.0f, 1.0f, 1.0f)); setUniformValue(command->m_parameterPack, LIGHT_INTENSITY_NAMES[0], 0.5f); }
http://code.qt.io/cgit/qt/qt3d.git/tree/src/render/backend/renderview.cpp (line ~900).
But, you can add a light with an intensity of zero to override the default light.
-
I was trying to avoid doing that, but if it's the only way then i guess i'll just have to.
Thanks.
-
We can discuss removing the default point light. I think the reason it was added was that you would still have some light effect even if you forget to set a light. Obviously that may not be what everyone wants.