March 6, 2011

lcAMDShader.cgfx – compromise shader for AMD graphics cards

EDIT (03/24/2011) – Seems even with my bests attempts although the shader ‘runs’ on AMD cards, normal maps don’t show up.  I’m taking the download offline until I can do more testing and hopefully fix the issue.

CGFX in Maya and AMD graphics cards seem to get along very poorly – most often they simply will not work together.  CGFX offers a large number of ‘profiles’ under which to compile shaders at runtime and only the arbfp1 and arbvp1 profiles seem to work reliably.

I’ve put together a cut down version of my lcUberShader so that it will run under the arbfp1/arbvp1 profiles.  This means that I’ve had to remove a lot of features, for example there are only 2 lights supported, 1 directional and 1 point light.  There are no cubemaps supported and currently no glow/incandescence map (although I hope to fit it in at a later time).  Also, rendering in the hardware render buffer seems to have problems in the 8-bit alpha mode.  But many of the features remain intact and it seems to work well.

I don’t have AMD hardware to test this on but hopefully some of you can give me your feedback.

I’m investigating whether the glslf/glslv profiles could work on AMD hardware, but its not certain.  With any luck Maya 2012 will have a new CG compiler and provide better AMD support.

1 comment:

  1. Yes, it works perfectly well! Thank you!