Shader Model 3.0 vs Shader Model 2.0b: Long Pixel Shaders to Improve Performance
As revealed earlier, there are no new effects brought into FarCry with Shader Model 3.0; the same applies to the Shader Model 2.0b – both are aimed to bring up the performance by calculating one “long” pixel shader instead of numerous “short” pixel shaders when rendering lighting indoors, saving precious rendering passes.
Many indoor scenes of FarCry contain a number of light sources, each requiring a number of pixel shader operations to be performed. Traditional pixel shaders 2.0 graphics processors have 32 texture and 64 arithmetic instruction slots, since besides lighting there are a lot of other operations need to be done, time-honoured DirectX 9.0 graphics processors, such as the RADEON 9700-series, cannot calculate the lighting in a single pass due to the absence of enough instruction slots. More advanced graphics processors can handle much more instructions: for instance, the RADEON X800 has enough slots for 512 scalar and vector math1ematical instructions in addition to 512 texture instructions, which is a minimum requirement for pixel shaders 3.0, while the GeForce 6800-series graphics processors can theoretically handle up to 65536 instructions. Higher number of instruction slots allows graphics processing units to perform more complex pixel shaders, which is crucial in a lot of cases.
It is necessary to point out that there are a lot more differences between ATI’s and NVIDIA pixel processors, for instance, NVIDIA’s pixel pipes sport loops and branches, while ATI’s does not. At the same time, availability on instruction slots does not mean that a visual processing unit with more slots will work faster compared to a chip with fewer slots: a lot depends on core-clock as well as time-registers.
Since modern graphics processors can calculate more data per cycle, it makes sense for APIs to utilize this capability in order to make use of more powerful GPUs. Microsoft’s HLSL compiler allows to program shaders according to target model, e.g., Shader Model 2.0b implemented by ATI or Shader Model 3.0 implemented by NVIDIA. Merging a number of pixel shaders into one results in saving rendering passes and increase of performance, which is done by Crytek for FarCry. This is absolutely legal and very efficient way to improve speed, as it does not require a lot of work from game developers, but provides more comfort gaming experience.
FarCry with the latest patch 1.2 has brought two new rendering paths to support the latest graphics processors: Shader Model 2.0b for ATI’s RADEON X800, X600 and X300 series as well as Shader Model 3.0 for NVIDIA’s GeForce 6800-series and other GeForce 6 products. NVIDIA’s render path seems to be more efficient: it calculates up to 4 lights in a single pass, while ATI’s path can calculate up to 3 lights per pass. ATI says that it is possible to calculate 4 lights on the X800 hardware in single pass, however, by now this has not been done, which may mean that either it will be enabled in future FarCry patches, or will not be activated ever for some reason.



