fogleman / pt

A path tracer written in Go.
MIT License
2.08k stars 110 forks source link

Transformed triangle mesh render incorrectly #12

Closed nidin closed 8 years ago

nidin commented 8 years ago

Transformed triangle mesh render incorrectly seems like normal calculations are wrong.

Scale = 1 image

Scale = 0.9 image

fogleman commented 8 years ago

Nice catch, thanks! For some reason, translating and rotating worked but not scaling.

Fixed with aac95259dbc79b708cbd1d4e726b81407bb73475

Also added examples/ellipsoid.go to verify non-uniform scaling.

fogleman commented 8 years ago

Found a couple more issues and fixed them. Here's a before & after of the new example.

Before:

1

After:

2

ghost commented 8 years ago

First: what editor used? Second: I found way to run examples... even 32-bit.

nidin commented 8 years ago

@acterhd If the first question is for me, Answer is WebStorm. and good that you found a way to run examples :+1: