i’m trying to make the FXAA shader example work with ATI card, so I’m trying to learn cg, the first problem with the code is this commands
texture2DLod(t, p, 0.0)
tex2Dlod(t, float4(p.xy + (o * rcpFrame), 0, 0))
both commands generate the error:
"cg program too complex for the driver"
whether i use
"basic-shaders-only #t"
or
"basic-shaders-only #f"
.
Is there any replacement for this commands?
When i googled the problem i found that to make this command works with GLSL on ati the following extension must be added:
#extension GL_ATI_shader_texture_lod : enable
But of course this code doesn’t work with cg.
I have the latest driver with high end ATI graphic card so i don’t think the problem in the card itself, but maybe the code is not compatible with all ATI cards.
if i wanted a shader to run perfectly on ati & nvidia, whats better for this task cg or glsl?
I want an advice on what shading language should i learn.
thanks in advance .
how can i know what profile should i use ?
do you mean something like this developer.nvidia.com/cg-profiles
so i need to add something like this at the beginning of the code?
Something like that, but you’ll also want to specify a profile for the fragment program, like “arbvp1 arbfp1”. Those are pretty outdated profiles though, you’ll likely want one of the latest profiles, or perhaps the GLSL profiles.
The Cg documentation and man pages will contain more information about the various profiles.
This won’t work with basic-shaders-only set to #t, so make sure it is set to #f.