Print at Dec 15, 2025, 4:46:59 PM

Posted by enkonyito at May 4, 2018, 6:38:06 AM
Re: Is Sunflow limited in Sweet Home 3D?
When I apply the RGB color #91895E (9537886 in decimal) to the furniture, the HomePieceOfFurniture.getColor() or HomeMaterial.getColor() method returns -7239330 (in decimal).
How can I convert this signed integer to an unsigned integer?

The value -7239330, processed by
this.sunflow.parameter("radiance", null,
power * (lightColor >> 16) * (this.homeLightColor >> 16),
power * ((lightColor >> 8) & 0xFF) * ((this.homeLightColor >> 8) & 0xFF),
power * (lightColor & 0xFF) * (this.homeLightColor & 0xFF));
does not give the expected color.
----------------------------------------
EnkoNyito