Skip to main content
GameDev.net gamedev.net
🔒 Locked

portable HLSL

Started by INVERSED Mar 22, 2004 at 3:00 PM 8 replies 1k views
Original Post
INVERSED
INVERSED
Hey all, I was just wondering if anyone knows of any solutions for a shader language that is portable across platorms, cards, and api''s. If such a thing existed, that would be great.
Write more poetry.http://www.Me-Zine.org
NLDEV
NLDEV
Try NVidia''s Cg language and compiler.

Take a look. http://developer.nvidia.com I believe.
healeyx76
healeyx76
I don''t think that will work with ALL cards though... only newer nvidia ones right?
NLDEV
NLDEV
quote:
Original post by healeyx76
I don''t think that will work with ALL cards though... only newer nvidia ones right?


It should support a great variety of cards (the question is how well will it support non-NVidia cards).

It can support the following codepaths (from what I can see):

DirectGraphics:
vs_2_*
ps_2_*
vs_1_1
ps_1_*

OpenGL:
arbvp1
arbfp1
vp30
fp30
vp20
fp20
TerrySz
TerrySz
ATI''s ASHLI is pretty close to what you are looking for. Its approach is meant to be API and platform agnostic.

Terry
NLDEV
NLDEV
quote:
Original post by TerrySz
ATI's ASHLI is pretty close to what you are looking for. Its approach is meant to be API and platform agnostic.



ASHLI does look to be quite robust (more so than Cg at least). However, Cg supports the older codepaths (vs_1_1, ps_1_*, vp20, fp20), which are necessary for me at least, with my GeForce 4 ti 4200.

NOTE: Edited for bad grammar.

[edited by - MikeMJH on March 22, 2004 9:05:50 PM]
INVERSED
INVERSED
I''m more partial to ATI myself at the moment, I think I''ll look into ASHLI. thanx
Write more poetry.http://www.Me-Zine.org
NLDEV
NLDEV
quote:
Original post by Anonymous Poster
There is also GLSLang, which is the high-level shading language which is part of the OpenGL 2.0 API. -Rab


That''s true, but he asked for a cross-API solution.
Guimo
Guimo
Try nVidia CgFX. If you search a little you can find it.

Its an API that works with FX files but compiles them using Cg into other profiles like GL. Al least that was the idea... search in the nVidia site.

The advantage using FX files is that they describe a rendering pass, not a shader. A rendering pass can be targeted to old hardware, shaders are not required. Read the DX docs.

Luck!
Guimo

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.