Materials, DOT3 and Combiners

For fragment processing in OpenGL:

Cg supports the NV register combiner and texture shader set-ups for DX8 level hardware (GeForce3 and GeForce4) but not the ATI versions (Radeon 8500-9200).

Cg supports ARB_fragment_program, which is GeForceFX and Radeon 9500 and up.

So my question remains: is there any easy/automated way to convert ‘DX8 pixel-shaders’ [or NV Register Combiners] into ATI compatible code (lower than 9500)?

I’m trying to make this as compatible as possible, so I’m going to try to find all standard codepaths available… then add optimizations and special features for non-standard codepaths, but I think my normal-map + material properties shouldn’t be that hard to achieve on a standard codepath, and should be there for lower-end cards (talking GF3/Lower Radeon’s/Parhelias and whatnot)…

Once again, seems I’ll have to buy all cards :stuck_out_tongue: Ah, well…

Originally posted by Jcl:
So my question remains: is there any easy/automated way to convert ‘DX8 pixel-shaders’ [or NV Register Combiners] into ATI compatible code (lower than 9500)?

XEngine has parsers of pixel shaders into OpenGL extensions:

  • XEngine now has a translator that can translate the DirectX pixel shader assembler (PSA) versions 1.0-1.3 to ATI_text_fragment_shader or ATI_fragment_shader
  • Great news! The OpenGL renderer can now translate DirectX pixel shaders version 1.0 to 1.3 (with some minor restrictions) to NVIDIA register combiners/texture shaders

I believe the coder of that engine is around…