[Cuis-dev] Ray tracer clipping highlights / problem with floats?

Luciano Notarfrancesco luchiano at gmail.com
Mon May 13 09:11:53 PDT 2019


You're amazing, you fixed it! Thanks!

On Mon, May 13, 2019 at 3:50 PM Juan Vuletich <juan at jvuletich.org> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190513/f51a03e0/attachment.html>


More information about the Cuis-dev mailing list