I've been looking into Cg recently due to D3D10 "issues" with the D3D FX format (You can no longer state track fx files). It seems that CGFX is far more like D3DX9 FX, than i ever imagined. In fact, the more i look into the format the more it looks like its completely compatible with D3DX. Is this true does anyone know?
Going to try and code up a CGFX implementation of my engine's effect code. Would be great to know how much time i'm gonna waste though ;) Compatibility between the 2, though, would be great as it would mean i could re-use my oversized library of fx files without having to laboriously make small modifications.
How similar are CGFX and D3DX FX?
Started by Goz, Sep 08 2008 09:38 PM
2 replies to this topic
#1
Posted 08 September 2008 - 09:38 PM
#2
Posted 08 September 2008 - 10:19 PM
I think CG is almost identical to HLSL. I've been using hlsl for about a year now, and most of my sample code comes from n-vidia (all written in cg) and I have yet to see a single difference.
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!
#3
Posted 09 September 2008 - 03:21 PM
CgFX was originally based directly off of HLSL, so back in the day you could compile them unmodified in CgFX. It has changed a bit since then, towards a more OpenGL-like state syntax, and other stuff like that.
There is however profiles in newer Cg that allows you to compile source code from both HLSL and GLSL, and the 2.1 beta, that was released in august, also lets you use D3D10 profiles.
There is however profiles in newer Cg that allows you to compile source code from both HLSL and GLSL, and the 2.1 beta, that was released in august, also lets you use D3D10 profiles.
"Stupid bug! You go squish now!!" - Homer Simpson
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












