SeskaPeel
10-16-2003, 01:34 AM
I wondered a while ago about "world" space normals. Everyone said me that "object" space normals could be interesting, but that world did not present any improvment.
At this point, my whole scenes are lit by a diffuse cube map. This cube map has of course to be considered in world space. To correctly lit a bumped mesh with this diffuse (works with reflection too - EMBM), I have to express the cube map and the normal in the same coordinate space.
It could be either world, but I would have to compute all normals, tangents and binormals in world space in the vertex program. Or I could leave them in object space, and then in the fragment program sample the normal from the bump map, transform it into object space, and then into world space.
Having object space normals would help a lot : after being fetched from the map, it just need to be transformed to world space. No more tangent buffer and binormal computation, that can easily make the transfer stage becoming the bottleneck.
World space normals would further save 3 operations by pixel for all the static geometry. This can become considerable when ALL your static geometry is bumped.
Any thoughts ?
SeskaPeel.
At this point, my whole scenes are lit by a diffuse cube map. This cube map has of course to be considered in world space. To correctly lit a bumped mesh with this diffuse (works with reflection too - EMBM), I have to express the cube map and the normal in the same coordinate space.
It could be either world, but I would have to compute all normals, tangents and binormals in world space in the vertex program. Or I could leave them in object space, and then in the fragment program sample the normal from the bump map, transform it into object space, and then into world space.
Having object space normals would help a lot : after being fetched from the map, it just need to be transformed to world space. No more tangent buffer and binormal computation, that can easily make the transfer stage becoming the bottleneck.
World space normals would further save 3 operations by pixel for all the static geometry. This can become considerable when ALL your static geometry is bumped.
Any thoughts ?
SeskaPeel.