Archived

This topic is now archived and is closed to further replies.

portable HLSL

This topic is 5014 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
There is also GLSLang, which is the high-level shading language which is part of the OpenGL 2.0 API. -Rab

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites