Re: Is Sunflow limited in Sweet Home 3D?
by enkonyito » Fri May 04, 2018 4:38 am
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
Code: Select all
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.