[Cuis-dev] Ray tracer clipping highlights / problem with floats?
Juan Vuletich
juan at jvuletich.org
Mon May 13 08:50:01 PDT 2019
On 5/13/2019 9:46 AM, Luciano Notarfrancesco via Cuis-dev wrote:
> Hi,
> I just ported to the latest Cuis this old project:
> https://github.com/len/RayTracer
>
> But I get this weird clipping of the highlights. See attached picture
> and compare it with the one at the bottom of the github project home.
>
> The first version was implemented with a new class Float32Color3 that
> I added to the package 'Math 3D' to represent colors, but later Juan
> merged Float32Color3 and Color. So now I just used Color, but I get
> this weird clipping. I lost my original Float32Color3, but just to
> make sure the problem was not Color I re-implemented Float32Color3,
> and still I get this effect. I suspect it is related to changes in
> Float during the last couple of years. Any ideas?
>
Hi Luciano,
The problem was that #+= and similar methods (inherited by Color from
FloatArray) could overflow the valid range [0.0 .. 1.0]. Just pushed fix
to GitHub. Please take a look.
Thanks,
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich
More information about the Cuis-dev
mailing list