bloodbob said:
I really fail to see how you get that displacement maps have little or no cost try 4x ATI Truform on a card other then the 8500/9200 and see if their is a cost.
You can do the Truform except for the tesselation completley on the vertex shader 1.1 its quite expensive (Part of my ShaderX2 article did just this), using render-to-vertex and VS 3.0 it could be made much faster. Certainly an order of magnitude faster than 200+ instructions per pixel.
bloodbob said:
And how many instructions do you it would take for the cpu to subdivide every surface and to normalise the new vertices so that their was atleast 1 triangle per pixel( Which is what is done in displacement mapping)?
You don't have to tesselate to 2 triangle per screen pixel, thats one particular method of rendering a displacement map. Its a cool and very high quality technique but isn't required.
bloodbob said:
If you want to argue this can be done on the GPU then yes you could use vertex texture but its only point sampling and you would still have to subdivide every surface to 1 or more per pixel and you would probably end up being vertex shader limited.
Even with 'just' SM3.0 for ShaderX3 I did a fully GPU rendered, lit and modified displacement map. Considering it was even fairly fast on REFRAST it screamed on NV40. Use render to vertex to do filtering, calculating normals etc.
Now move forward a year or two which will be the time we can afford 200-600 instructions per pixel for this effect, you won't have vertex shader's (unification with vertex texturing the same a pixel texturing (filters and cost i.e. virtually free bilinear texture sampling) ) and some form of tesselation unit. Possible (not sure about PC) arbitary read/write memory access.
So you do something like (this is off the top of my head so may have errors)
1st pass. Use a no output shader to calculate the screen extents (and as such the amount of subdivision needed). Export this into the command buffer as the tesselation unit parameters.
2nd pass. Use a pixel frequency shader to re-sample the displacement map into a screen extents sized one.
3rd pass. Use a pixel frequency shader to calculate vertex normals (if needed i.e. Realtime changing displacement maps)
4th pass. Tesselate and use a vertex frequency shader to look up the the resampled texture.
Currently we can do most of the 2nd/3rd and 4th passes (we have to use fixed subdivision steps).
Displacement mapping has got an aura of being massively expensive so nobody even looks at it. I suspect that displacement mapping can be achieved at roughly the same cost of a 400 instruction pixel shader (of course it will stress other parts of the chip though)