ObjectMeshStatic::getColor bug


photo

Recommended Posts

Hi,

Shouldn't

vec4 ObjectMeshStatic::getColor(int num, int surface) const
{
	return vec4(mesh_ptr->getColors(surface)[num]) * 255.0f;
}

actually be:

vec4 ObjectMeshStatic::getColor(int num, int surface) const
{
	return vec4(mesh_ptr->getColors(surface)[num]) * (1.f/255.0f);
}

since mesh_ptr->getColors returns in 0..255 range and you want to output in 0..1 and not the other way around?

Kind Regards,

Adrian L.

Link to post