dominikbehr
Newcomer
MfA said:Ive <A HREF=http://groups.google.com/groups?q=renderman+single-precision&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=87a9n5%2482b%241%40sherman.pixar.com&rnum=7>seen it said</A> that prman uses single precision floating point almost exclusively.
Wow! You have amazing google skills And straight from the horses mouth. I agree that prman is high-end rendering. If 32bit fp is good for prman, especially for geometry processing thats really cool.
but,
I think this may be quite important here. He admit that there are places where doubles are vital. Unfortunately we do not know what would be consequences of using floats instead. Maybe what he considers vital we wouldnt even notice. Or maybe we would.Larry Gritz said:Of course, both use doubles occasionally as
temporaries for intermediate calculations in certain parts of the
renderers where that last little bit of precision is vital.
LeStoffer:
It seems Microsoft designed DX9 to last a while. And shaders 3.0 spec tells us how hardware will evolve over next few years. I consider it an incremental change over shaders 2.0 We just experienced a big shift from fixed to programmable pipeline. I think that we entered new era in hardware accelerated computer graphics. Judging by how long we used fixed pipeline current era will last very long. Actually there will be little incentive to change because there is nothing new on the horizon and everything seems to be possible now.
Reverend:
Your comments on precision issues are quite valid. Personally I dont find 32bit fp good enough for everything either.
See render to vertex array demonstrated lately at GDC using Radeon 9700 and uberbuffers extension.Now, you may ask what is this positional data if it isn't an input to the vertex shader (which isn't supported yet by any hardware currently available)? Well, it could be in vertex or pixel shader constants, vertex stream values, textures (either manually generated or coming from render-to-texture).
------------
In summary:
- Computers work with finite precision numbers.
- It is a programmers job to know the architecture and write code that doesnt run into problems.
- Certain classes of calculations require some minimal precision.
I like geometry done in doubles or more (I think all the doubles input in OpenGL is there because of precision issues in flight/space sims), but fp32 seems to be good enough for most cases. fp24 is good for displacement mapping too. Even fp16 could be used for storing source object vertices, normals, normal maps, displacement mapping. But usually you want your matrices in fp32 or fp64.
For color/lighting calculations 8bit int, fp16, fp24 and maybe even fp32 in extreme cases depending on what you are doing.
Texture addressing depends on lots of factors, usually on size of the texture and number of repetitions. I liked the 3dlabs demo showing the precision of their texture interpolators on wildcat line. But the message I got was really: if you have dumb programmer|artist they can even screw up simple scene with a conveyor belt and ducklings.