Andrey Khonich – Crytek, Makers of Far Cry
GD: A lot of attention has been paid to NVIDIA's support of Pixel Shader 3.0 - can you specifically think of anything PS 3.0 can be used for that can't be done in PS 2.0?
Andrey: In VS3.0 Shader model actually is possible to support general
displacement mapping (with smart Shader design when vertex Shader has to do something during waiting for texture access).
In PS3.0 shaders it’s possible to decrease number of shaders using dynamic branching (one Shader for general lighting) and in such way decrease number of Shader switches and as result
increase speed, and also we can utilize dynamic conditional early reject for some cases in both PS and VS and this also will
increase speed. As to NV40 generally possible to use co-issues better to take advantage of super-scalar architecture (we can execute 4 instructions per cycle in a single pipeline).
-
Handle several light sources in single pixel shaders by using dynamic loops in PS3.0.
-
Decrease number of passes for 2-sided lighting using additional face register in PS3.0.
- Use geometry instancing to decrease number of draw-calls
(remove CPU limitations as much as possible).
- Unrestricted dependent texture read capabilities to produce more advanced post-processing effects and other in-game complex particles/surfaces effects (like water).
- Full swizzle support in PS3.0 to make better instructions co-issue and as result
speedup performance.
- Increase quality of lighting calculations using 32 bit precision in pixel shaders on NV40.
- Take advantage of using 10 texture interpolators in PS3.0 Shader model to [b]reduce number of passes in some cases.
- Easily do multiple pass high-dynamic-range rendering on FP16 targets.
-
Speed up post-processing a lot by using MRT capabilities and mip-mapping support on non-power-of-two textures.