Hi Luca, Allen, Josselin, ok, I found the bug. as I said the bug is not really a bug it is more or less slightly unclear definition of glsl. The problem was to use texture2D method instead of texture2DLod to get value from mipmaps. Actually in the definition of glsl texture2DLod is mean to be used only in vertex shaders. For whatever reasons texture2D do not really accept the last parameter, so one do always read the first mipmap level, instead of the last one. Another problem was not to clamp the resulting luminance to 0 on negative values. Negative values happens when everything is black, so the log(0+epsilon) became negative.
On nVidia hardware texture2DLod can be also used in fragment shaders. Unfortunately I have no clue about ATI hardware. I placed some extra glsl extensions into the shader code, to activate this behaviour also an ATI cards. I found this info on a forum about game development. So, maybe this helps. I debugged now the HDR example and it seems to work perfect. However I am not sure how it will work on ATI cards, I hope it would also work perfect :) New changes are submited into osgPPU-0.4.1 repository, the svn trunk is not patched with this changes for now. I will do this in the next days. Cheers, Art ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27362#27362 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

