What you really see in games?!

  • All new games out there promise you the best graphic and inovations used for its creation when they ship out to the market. Still game industry is using the latest, Shader Model 3.0 version cause DX10 and Shader Model 4.0 is still atleats several months away.



    I have the chance to test this using nVidia's professional developer's software - NVPerfKit 2.1 Suite. Basicly the tool is designed to help developers improve their games by testing how their game is been run on nvidia graphic cards (full info available for GeForce 6 and GeForce 7 - for the older ones, soem inf owill be missing). Tool measure GPU (Graphic Processor Unit) and card memory load in real time:


    GPU internal modules measured:


    VA - Vertexs Assembly Units
    VS - Vertex Shader Units (in common this module deals with lightning in frames)
    PS - Pixel Shader Units (the common work when building the scene + filtrations if enabled)
    ROP - Raster Operations Units


    Card memory
    Vid Mem - video card memory been used
    AGP Mem - memory taken from the RAM to render the scenes (keep extra textures)


    System
    GPU Idle - the time which the GPU is free and not rendering anything
    Driver Time - the time which the video driver wait for the GPU
    CPU waits for GPU - the time which is needed to execute driver code + the time which driver wait for the GPU
    Ms per frame - the time in milli-seconds needed to render the current frame



    Here is how Ms per frame tie with fps (frames per seconds):


    FRAME_TIME 17ms 34ms 50ms 75ms 100ms
    FPS 60 30 20 13 10



    To be able to measure all this info acurately in real time the tool is using special version of video driver and actually can access the GPU internal register while the video card is working:



    Because the fact this tool "scan" all stream of commands for the video card and "monitor" the work of the GPU on low-level its good for developers but it also reveal how the game and its engine works, so just a few games support it in their official versions. With other words NVperfHUD require game engine to be defined to use it - its not much work at all, even a sample code is given to make this easier. In this way program wont force evry game to work with it and its all decition of the developers.



    Anyway, the only game i found working with it of the ones i have installed is Need For Speed: Most Wanted @ 1024x768 high details which require DirectX 9.0c (this version of DX is associated with Shader Model 3.0). The graphic card used is ASUS GeForce 6600 128MB PCI-E @ 480/680 with 8 pipelines/ROPs/Pixel Shaders and 3 Vertex Shaders versions Shader Model 3.0. For the test i used dual core processor and 2gig ram so the gameplay if limited will be because of the graphic card which we are testing.



    Look at the graph table in the upper right corner and the one in the bottom left corner on both screenshots:





    Notice that the first screenshot is been taken in movement and the second - when the car is still and then look at the upper right graph table. What you can notice is that the game runs a bit lighter than when you have stoped. Its a bit illogical but it have its explenation- when you moooving evrything around and even infront get bloomy- faster you go more bloomy it looks so all the details are lost and the load on the card is little lower than when you stay still.



    Look at the screenshots bellow. The color will be screwed but with a reason. Now there is a addtitional table at the top in the middle - a list of Pixel shaders version which offer to disable execution of a Pixel Shader code with specific version. The oen disabled on each screenshot is marked with small red box infront on the list and the area of the screen which uses the disabled code will be colored with specific color:



    On the first screenshot is been disabled execution of Pixel Shader 1.1 code and this area of the sceen where this is been used is colored in green



    On the second screenshot is been disabled execution of Pixel Shader 2.0 code and this area of the sceen where this is been used is colored in blue



    On the third screenshot is been disabled execution of Pixel Shader 2.a code and this area of the sceen where this is been used is colored in light blue




    On the forth screenshot is been disabled execution of Pixel Shader 3.0 code and this area of the sceen where this is been used is colored in orange


    All other shaders disabled which are not listed above didnt seemed to been used.


    Note: DirectX 8.0 -> Pixel & Vertex Shader 1.1 & 1.3
    DirectX 8.1 -> Pixel & Vertex Shader 1.4
    DirectX 9.0 -> Pixel & Vertex Shader 2.0
    DirectX 9.0b -> Pixel & Vertex Shader 2.a
    DirectX 9.0c -> Pixel & Vertex Shader 3.0
    latest graphic cards at the moment + last revisions of DX -> Pixel & Vertex Shader 3.0+


    When Shader Model 3.0 (Pixel & Vertex Shader) been represented for a first time their purpouse was to make creating soem of most used efects in graphics easier and shorter to define and faster to execute which allowed to developers to improve the graphic when they know that there are cards capable of executing it with acceptable speed. Shader Model 3.0 also brought HDR (High Dynamic Range) effect. except the HDR effect on theory Shader Model 3.0 itself dont bring better graphics - just speed over 2.0 and 2.a. However as you see particulary for Need For Speed: Most wanted still use the old code - 2.0 and 2.a in most (80%) of the code, even quite much the verry old Pixel & Vertex Shader 1.1. You wouldnt expect that from such a game.


    Someone might be asking why same areas of the screen been colored with different colors when different versions of Pixel Shader been disabled. Most likely those are different layers of the final frame.


    Notice also that the FPS of 25 average is not hight for a GPU which load is not higher than 35-40%. I think its cause of a limited speed of graphic memory both clock and memory interface of 128-bit instead of 256-bit of faster cards and memory size which increase fast up to the maximum for less than 10min. All textures are kept in the memory and textures are the biggest information which GPU have to work with.



    As conclusion not evrything is as it seems. Each game will behave different if you could run this measures on it. Sometimes games looks heavier to run on your graphic card than they really are which makes you spend more money for new one and makes companies benefit from it.



    P.S. BTW here is how intro movie been defined using Direct3D commands to the APi interface - i thought might be interesting: