Showing posts with label bugs. Show all posts
Showing posts with label bugs. Show all posts

11/20/2008

Finding perfection

Long time no see, but this one made me really laugh !

Picture yourself creating a test scene with Lightwave 3D, which Autodesk didn't buy yet. You plan to test the exact behaviour of Lightwave's Incidence Angle gradient texture layer.

Picture yourself creating a Box. The default one, using numeric values, a perfect cube, each side is 1 meter long.

Picture yourself placing this Box in a layout, where your "Classical camera" has a perfect FOV of 90°, rendering to a perfectly square 900x900 bitmap.

Picture yourself placing your Box at coordinates (0,0,0) and your camera at coordinates (0,0,-1) - so that your camera perfectly sees the whole Box - and only the whole Box.

Picture your Box having a perfect white surface, with 0% diffuse and 100% luminosity - and a pure perfect red backdrop.


Picture yourself rendering the camera view. The result is a pure perfect white image. No red pixel, perfect. There's no point for me to show this image - it's plain white.

Now, picture yourself converting the Quads of your perfect Cube to perfect Triangles, using Triple.

Picture yourself, confident, rendering again - with exactly the same perfect setup. Ah, perfection is coming again... but... wait... no... look carefully...

Perfect holes.

7/03/2008

ATI/AMD driver stuttering - or - a bug in Catalyst 8.6 ATI drivers' GLSL compiler

A few minutes ago, I just put my dreaded AMD Radeon HD 2600 test board in my computer. My point is to fix a compatibility problem encountered by a customer...

As I had horrible experiences with this board at its release date, I'm not surprised to see that my first run of my OpenGL tools almost fail miserably.

I just wanted to archive the problem I'm encountering right now with Catalyst 8.6 on by Windows XP 32 SP2 box.

On some of my GLSL shaders, the call to 'glGetObjectParameteriv(..., GL_OBJECT_ACTIVE_UNIFORMS, ...)' gives me a plain wrong value, superior to the real one.

So, my enumeration, just following this query, using
'glGetActiveUniform', fails with a GL_INVALID_VALUE error for the dangling indices... Of course I was not checking the error code, which lead to a stuttering-like behaviour where the last given uniform name was repeated 2 or 3 times (in my case).

Edit :: In fact, the number of active uniforms is the good value ; the problem comes from the enumeration, I'm getting a GL_INVALID_VALUE for an index that should be valid. As a result, I miss some valid and active uniforms...

I just wonder why this happens...

I already had troubles with my multi-shader-objects-linked-together-with-external-functions-that-the-linker-normally-resolves approach ; so this may be linked...

I won't neither take the time to investigate or provide a minimum reproduction case to AMD ; but, this morning, before all this, I was toying with the idea to have a set of simple (python?) scripts that could "unit test" the drivers I use.

Does any one know if such a thing exists in a public place ? I'd be glad to try to contribute !

Edit :: Hum, it seems that I'll have to find a workaround and investigate some more... I should have turned my hand 7 times around my keyboard before posting !

Edit (2) :: I finally set up a python unit test that reproduces the problem, it needs PyOpenGL and is available here.

1/29/2008

.NET experiments

The first time I tried the .NET Framework was for a "throwable" GUI project ; I then decided to test the brand new MS Visual Studio 2005 beta 1. The development went pretty smoothly, and I was quite nicely surprised.

Then came MSVS 2005 beta 2, I decided to continue the development with this shiny new toy, hoping that it would fix a few quirks with the GUI Designer - I mainly remember that I had to spend much time to change my code, as some of the API changed between beta 1 & beta 2...

The same reproduced for the final MSVS 2005... I thought it funny to change an API this late in a product life...

I'm now working on another project with .NET Framework 2.0, just started a few weeks ago. Last week, I checked in my changes before leaving the office - everything running smoothly ; the following morning, I run my project to freshen my memories, and... crash...

Huh.

After many rollbacks, head scratchings, reboots, rebuilds, came an idea... what if... what if the message I saw the night before was not so iniquitous - you know the Windows Update message, that tells you not to worry, that your computer will shut down as soon as the updates are installed...

One uninstall of .NET Framework 2.0 SP1 later, everything was up and running smoothly again...

A few hours after that I figured a workaround for the brand new bug (or feature?) in SP1 that reads 'Unable to cast object of type 'System.Reflection.Module' to type 'System.Reflection.Emit.ModuleBuilder'. in the inner code of mscorlib's System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule()

I'm not sure I'm only enjoying toying with .NET...