<%BANNER[top_768x90]%>
<%BANNER[banner_468x60_h]%>
<%BANNER[article]%>

Articles: Video

<%BANNER[fp_160x600_r_1]%>
Pages: [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 ]

Shader Model 3.0 in FarCry: Bring the Speed!

According to Crytek, FarCry uses instancing for trees and grass in open scenes of the game, particularly in “Training” and “Regulator” levels, as well as Pixel Shaders 3.0 instead of Pixel Shaders 2.0 in order to save rendering passes in indoor scenes, particularly on “Research” and “Volcano” levels.

 
FarCry with Shader Model 3.0 and HDR, screenshot from nVNews.net

Instancing is one of the Shader Model 3.0’s key features. Currently, games face limits on the number of unique objects they can display in the scene, not because of graphics horsepower, but often the CPU-side overhead of either storing or submitting many slightly different variations of the same object.  For instance, a forest is made up of trees that are often similar to each other, but each would be in a different position, have differing height, branch length, leaf colour, and so on.  In order to add the desired variation, developers have to choose between storing many separate copies of the tree, each slightly different, or making expensive render state changes in order to rotate, scale, colour and place each tree.

Instancing allows the programmer to store a single tree, and then several other vertex data streams to specify the per-instance colour, height, branch size and so on.  For instance, a single 1000-vertex tree model would contain the vertex positions and normals, and a 200-element vertex streams would contain positions, colours, heights, and branch length values.  Instancing allows the programmer to submit a single draw call, which renders each of the 200 trees, using the same data for the basic tree shape, but then vary it through the per-instance streams.

Another way to improve performance in some situations is to employ a complex Pixel Shader 3.0 instead of executing multi-pass Pixel Shader 2.0 rendering, saving the precious rendering passes. Crytek said that complex indoor per pixel lighting in FarCry is now done [in SM 3.0 path] using Pixel Shader 3.0 in a single pass instead of multiple passes using Pixel Shaders 2.0.

Most probably there is still quite some headroom for FarCry optimisation using Shader Model 3.0, but at this point only instancing and per pixel lighting models are reported to be implemented. Both do deliver additional performance and prove that Shader Model 3.0 is not a “tick feature”, but something that can be used and is likely to be used by game developers.

Pages: [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 ]

<%BANNER[banner_468x60_f]%>

Discussion

Comments currently: 0

You must log in to add comments.

Forgot password? Registration

remember me