RE: High Level Shading & Gaming Industry

Date : Fri, 20 Oct 2006 20:02:13 -0700
To : <3DGames(at)Softimage.COM>
From : "Wessam Bahnassi" <wbahnassi(at)inframez.com>
Subject : RE: High Level Shading & Gaming Industry
Honestly, all this multi-platform thing is totally dependent on the
company's policy. I think casual games have more tendency to support
multiple platforms because their problems are usually easily-manageable. But
larger titles concentrate on the market with the biggest numbers, and they
ship to other platforms as well if the title becomes a top-seller.

Realistically, even if a title is to be launched on targets that use D3D and
OGL, it's hard to share shaders across platforms mainly because of the huge
hardware differences. Advanced features vary a lot between platforms, and it
would be a shame to lose all that for a common-denominator solution that
allows you to write a shader once and reuse on multiple platforms. From a 3D
engine design POV, it's much better to abstract shaders into a higher-level
interface that allows artists specify a "material" for an object rather than
directly specify shader-code. The engineers would then be free to implement
the material in the most optimized way for each platform. In that sense, you
might actually end up mixing Cg and HLSL and GLSL or even a
company-proprietary language for a single project. And personally I wouldn't
consider that a bad design...

Does this answer your question? :) 

Wessam Bahnassi
Microsoft DirectX MVP,
Programmer
Electronic Arts
--
In|Structurez Arabic Gamedev Community
www.instructurez.com

> -----Original Message-----
> From: owner-3dgames(at)Softimage.COM [mailto:owner-3dgames(at)Softimage.COM] On
> Behalf Of Guy Rabiller
> Sent: Friday, October 20, 2006 9:36 AM
> To: 3DGames(at)Softimage.COM
> Subject: Re: High Level Shading & Gaming Industry
> 
> 
> Thanks for your input Wessam.
> 
> 
>  > ../.. Cross-platform support? For what? Linux? FreeBSD?
>  > These are not OSs that gamers use ../..
> 
> What about the Mac ?
> 
> 
> But, lets say that both support for DirectX and OpenGL is needed.
>  From your <personal>opinion</personal> would it be preferable to only
> support Cg or only HLSL/GLSL ?
> 
> --
> guy rabiller | 3d technical director (at) LaMaison
> 
> 
> 
> Wessam Bahnassi a écrit :
> > HLSL is well-integrated within the DirectX SDK and is very easy to use
> and
> > integrate out of the box. If the game (or even the whole company) is not
> > going to use OpenGL, then why bother with Cg? And thanks to the Xbox,
> your
> > HLSL code can be easily ported to Xbox and 360, whereas Cg doesn't
> compile
> > for these targets...
> >
> > <personal opinion>
> > Well, asking about whether to choose Cg or HLSL is similar to asking
> whether
> > to use OpenGL or Direct3D. As you know, most PC game titles today use
> > Direct3D as a 3D API.
> >
> > Now, from a 3D Engine developer point-of-view, it's a big waste of time
> to
> > support both D3D and OGL. Cross-platform support? For what? Linux?
> FreeBSD?
> > These are not OSs that gamers use. But Xbox, and Xbox360 (which are D3D-
> only
> > based) are widely distributed. PS2 and PS3 do not use OGL as their
> graphics
> > API so the engine will still have to support these in a different code
> path
> > anyways whether it supports OGL or not...
> > </personal opinion>
> >
> > Performance-wise, one might argue that Cg delivers better performance on
> > nVidia hardware because the compiler knows exactly what's running
> beneath
> > it. This fact will mostly change with D3D10 now as the compilation of
> HLSL
> > will be moved to the driver itself, which means nVidia ca provide the
> same
> > optimization capabilities as they do with the Cg compiler (unless if
> they
> > intentionally don't want to :)
> >
> > Wessam Bahnassi
> > Microsoft DirectX MVP,
> > Programmer
> > Electronic Arts
> > --
> > In|Structurez Arabic Gamedev Community
> > www.instructurez.com
> >
> >
> >> -----Original Message-----
> >> From: owner-3dgames(at)Softimage.COM [mailto:owner-3dgames(at)Softimage.COM]
> On
> >> Behalf Of Guy Rabiller
> >> Sent: Friday, October 20, 2006 3:22 AM
> >> To: 3DGames(at)Softimage.COM
> >> Subject: High Level Shading & Gaming Industry
> >>
> >> Hi,
> >>
> >> I'm trying to gather usefull informations about high level shading
> >> habits and usages in the gaming industry.
> >>
> >> So far, and afaik, there are HLSL, GLSL & Cg among the most used high
> >> level shading languages available.
> >>
> >> I've seen that most engines are trying to support all of these, some
> >> only support one.
> >>
> >> The kind of questions I have in mind is for instance:
> >>
> >> What the point of supporting HLSL & GLSL if Cg is able to handle both
> >> OpenGL and DirectX ?
> >>
> >> Do you think it would be reasonable to only support Cg ? Are there any
> >> strong reasons why an engine should support Cg and HLSL for instance ?
> >>
> >> I'm thinking about one: Gaming Console ( especialy XBox for instance
> >> where HLSL is mandatory, afaik ).
> >>
> >> But outside the gaming console world, would there be any reason at all
> ?
> >> Performance may be ?
> >>
> >> What are your thoughts/informations about this matter ?
> >>
> >> Thanks in advance for any hint.
> >>
> >> --
> >> guy rabiller | 3d technical director (at) LaMaison
> >>
> >
> > ---
> > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
> body:
> > unsubscribe 3dgames
> >
> >
> 
> 
> 
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe 3dgames


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe 3dgames


Search the 3D Games List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.