CompilerVersions/NatTestCase

From PixieWiki

Jump to: navigation, search

Contents

[edit] Source files

Media:NatachaGccTest.rib

Media:NatachaGccTestDisplacement.sl

[edit] Results

sdrc yielded the same .sdr file in both cases.

[edit] gcc 3.3.6

Image:NatachaGcc3Test.png

[edit] gcc 4.0.2

Image:NatachaGcc4Test.png

[edit] First analysis

In some areas gcc4 seems to yields expected results while gcc3 yields ugly results, however most of the parameters are left at their defaults value, especially self-intersection paramters and dicing level, which might be changed get nicer results, although there might be some bug hidden behind it too. I think gcc4 compiled giving better results is in fact a bug compensating for another bug/misconfiguration.

My interpretation of what is happening: the wall is black on the gcc3 image because of self-shadowing, because adding a shadowless or an ambient light would illuminate it, and removing the displacement shader makes the polygon behave normally on both cases. So, the wall showing on the gcc4 image is akin to the lack of proper shadow for the torus. This shows a ray intersection problem. Another problem, not related to the raytracer, is that somehow some buckets don't take the torus or the disk into account. So far I have only found consecutive buckets missing an object, which then appear normally (eg like on the torus here, you can see at which bucket the object "appeared").

It is not shown here, but at least cylinders and spheres behave normally, both hider-wise and raytracing-wise.

Wierd stuff: if I remove the torus, the wall gets black on the gcc4 render, behaving the same way as the gcc3 one. Moreover, moving the torus moves the shadowed part of the wall, but I could not find any correlation between the two movements.

This pretty much sums up what gcc-version-related differences I have found so far.

[edit] OpenEXR

With gcc 3, everything goes smoothly from compilation to "make check". I did not use it because of lack of OpenGL and FLTK to compile exrdisplay and lack of time to find out what else I can do with it.

The sources of OpenEXR 1.2.2 do not compile with gcc 4. However, I heard gcc 4 is less tolerant with less-than-standard synatax than gcc 3. Indeed, it seems it was only a declaration through the "friend" statement that is no longer considered as a declaration, or not with the same scope. Anyway, adding

class Image;

right after the #include block of exrmaketiled/Image.h is enough to make it compile smoothly, and "make check" works as well as with gcc 3.

Personal tools