Crytek weighs in on Shader Model 3.0

AFTER WE PUBLISHED our article about the new Far Cry 1.2 patch late last week, I had the chance to speak to Cervat Yerli, CEO and President of Crytek, the development house that created Far Cry. In addition to his official titles, Yerli served as technical and creative director for Far Cry, so he was one of the principal figures involved in making the game. I asked Yerli about Crytek’s efforts in developing the new patch for the game and about working with Shader Model 3.0.

Taking the new model out for a spin
Yerli said that Crytek dedicated a pair of programmers to implementing the Shader Model 3.0 code path in Far Cry, and he said the entire retrofit took three to four weeks to complete. Obviously, implementing Shader Model 3.0 was more complicated than just ticking a checkbox for a new render target in a compiler, but it didn’t require a rewrite of the game engine. Some of the changes Crytek made took only a few hours, while other elements of the retrofit took a week or two to complete. In fact, after the first two weeks of effort, Crytek had the initial version of the Shader Model 3.0 code path up and running.

Far Cry, of course, started out with a fairly sophisticated game engine that took advantage of Shader Model 2.0 to deliver per-pixel lighting. Yerli said Shader Model 3.0 doesn’t bring any change in visual fidelity, just better performance. In fact, he emphasized the point repeatedly during our conversation. In the case of pixel shaders, lighting some objects covered with shader-based materials using Shader Model 2.0 required multiple passes—one pass per light. If the object were affected by three lights, the pixel would have to take three passes through the rendering pipeline. With Shader Model 3.0, Crytek was able to consolidate its per-pixel lighting work so that up to four lights can be rendered in a single pass.

Shader-based materials with multiple lights are faster with 3.0
(Click for larger version)

Crytek’s revamped pixel shaders use branching and looping in order to calculate the effects of multiple lights in a single pass, but the instruction lengths of those shaders don’t approach the 96-instruction limits of SM 2.0 pixel shaders. Instead, Yerli stated that the primary benefits of SM3.0 pixel shaders are more constants, tables, and the like, which lead to better performance. The effects you’ll see in current games running on today’s hardware, in his estimation, can be implemented within the 96-instruction limits of SM2.0; the longer instruction lengths in Shader Model 3.0 won’t be practical until the next generation of graphics hardware arrives. For now, he said, SM2.0 will allow the creation of any effect developers want.

Beyond pixel shaders, Far Cry 1.2 uses another Shader Model 3.0 feature, geometry instancing, to accelerate game performance. With geometry instancing, the Far Cry engine can place multiple copies of the same 3D model onscreen at once, each with different attributes, using only one draw call. The game engine automatically uses geometry instancing whenever copies of the same static mesh appear at once. Although this capability primarily provides benefits in areas with lots of grass and foliage, the feature isn’t linked to a single model type. In fact, like the pixel shader enhancements, geometry instancing is a game-wide enhancement that requires no change to the game content.

I asked Yerli about the image quality problems on GeForce 6800 cards in version 1.1 of Far Cry. He dismissed those as “just rendering issues” and said that the Shader Model 3.0 path cleaned up those problems. The SM3.0 path does include a mix of FP16 and FP32 datatypes on GeForce 6800 cards for the sake of performance, but Yerli said Crytek never sacrificed image quality for performance, a move that’s “not an option” for them. Out of curiosity, I also asked whether he knew of any instances where the use of FP24 precision on ATI cards caused visual artifacts, and he said no.

The skinny on quick-save
As we wrapped things up, I veered off the path a bit to ask another question on everyone’s mind: Will Far Cry 1.2 include a revamped save-game system? Yerli said there will be two versions of the 1.2 patch released. Crytek hopes to release the first version within the next week or so. That initial version of the 1.2 patch will not include a quick-save function. Some time later, Crytek plans to release a version 1.2 patch with quick-save enabled. Yerli said building quick-save into Far Cry has been a painful process, because the game wasn’t designed with this feature in mind. However, Crytek is fixing bugs daily, and the quick-save patch will be released once all the bugs are squashed.

Comments closed
    • Chrispy_
    • 16 years ago

    Where’s the Co-op multiplayer campaign support that the community has been screaming about for years? Why bother hinting that the patch may bring this highly sought-after (and easy to implement) feature if all they do is sleep with nVidia for a few months. What percentage of gamers, playing FarCry right now own a 6800 series?

    Crytek = Judas.

    I wouldn’t be at all shocked however, if the mysterious surprise Gabe Newell has for HL2 multiplayer again, ignores cooperative network play. Deathmatch has been done for nigh-on 10 years now and it’s getting OLD. Why do Crytek have to join the “boycott co-op” bandwagon as well?

      • Glorious729
      • 16 years ago

      Valve is working closely with some mod group (probably Sven) to make co-op for HL2 as a mod option.

      Also, the multiplayer is probably TF2 or something of the like.

        • hmmm
        • 16 years ago

        The MP will probably be standard DM like that of HL. But they say they are porting all HL content over to HL2. I know they’ve been touting CS on the Source engine. One would expect DOD too.

    • Uncle008
    • 16 years ago

    Heres a quote from Driverheaven.
    So, the 6800 has received an excellent increase in IQ, what about the Radeon? Well all is not rosy in the ATI garden. Things have gone from pretty much spot on in patch 1.1 to, well lets be honest, awful in 1.2. There are texture issues on every level which involves an outdoor section and these issues are far worse than anything we saw on the 6800 with previous game versions. The point of whether this affects performance is moot due to the fact that if you have a Radeon you won’t want to play with version 1.2 at all. To better illustrate the issues here are a few screenies, again at 1600×1200 with no aa or af (these texture issues flicker in and out).

    Therefore, if you’ve got a 6800 series card don’t hesitate to install the patch, it will greatly improve your Farcry experience. If you’re a Radeon X800 user keep well away and stick with patch 1.1.

    So much for me upgrading. I also had a look inside the cashfiles in the FarCry directory and it seems that Nvidia had more influence to the game then just working on SM3, most of the files using pixel shader were done by Nvidia. Heres a sample.
    // Pixel Shader 1.1 generated by NVIDIA Cg compiler
    // cgc version 1.1.0003, build date Jul 7 2003 11:55:19
    // command line args: -q -profile ps_1_1 -entry main -DCGC=1
    //vendor NVIDIA Corporation.
    My 2 cents worth

      • Entroper
      • 16 years ago

      That comment is from nVidia’s Cg compiler…

      • Chrispy_
      • 16 years ago

      Isn’t it odd how games still only run properly on recent nvidia hardware if they’re compiled with a nvidia compiler on an optimised path. Even more curious that after intensive injection of time and effort from nvidia that never-before-seen levels of graphical corruption are seen on ATI hardware, and I’d hazard a more-than-speculative guess that this applies to all non-nvidia hardware.

      /me steams from the ears

        • kvndoom
        • 16 years ago

        you know, I thought one of the primary reasons for Direct3D in the first place was the end of all that “optimized for ******” crap we had to deal with in the late 1990’s.

        Buy a game, and you have to download the S3 patch, OR the Matrox patch, OR the 3dfx patch, OR the Rendition patch, /[

          • Sargent Duck
          • 16 years ago

          Indeed, if only Nvidia played by the rules. ATI has been following the dx standard, and games just naturally run great on Radeons right out of the box. Geforce cards run decently, but you have to wait a couple of months for Nvidia to optimize your new game. Good luck if you want to play a game that isn’t all that popular with Nvidia

    • hmmm
    • 16 years ago

    I’m a little annoyed that person-months were spent developing the SM3.0 path for one video card while quicksave is going to be delayed for who-knows-how-long.

    CryTek promised a normal save system for 1.2. I guess that would explain why they want to call both patches 1.2. Lame.

    • Spotpuff
    • 16 years ago

    Adding quick save would totally ruin this game.

    A lot of the fun of it was, at least for me, playing a different style of game rather than the type where you just run in and kill everything, where one mistake can kill you instead of being ablet o take out everything in sight with nary a scratch on you.


      • rxc6
      • 16 years ago

      Well, I’ll agree with you on that. Not being able to save was a real pain in the butt, but after a while it made me be smarter and not just jump and kill whatever is out there. Definitely was more fun 😉

        • R2P2
        • 16 years ago

        Hey, if quicksave is available, you don’t /[

          • blitzy
          • 16 years ago

          i agree, definately better to have the option than not

      • indeego
      • 16 years ago

      Agree’d. I played through a second time right afterward and was able to take a different path and style, 95% of the game was different. I found it much easier, yet just as fun, the second time through, even on a harder difficultyg{<.<}g

    • danny e.
    • 16 years ago

    hmmm quick save added. the biggest complaint of most people.
    that adds another star to the already star plastered game

Pin It on Pinterest

Share This