The most simple fragment shader

Hi everybody!

The following (very simple!!!) fragment shader won’t link:

void main()
gl_FragColor = vec4(0.4, 0.4, 0.8, 1.0);

Everything works fine until glLinkProgram(). This is the info log:

Fragment info

Internal error: assembly compile error for fragment shader at offset 306:
– error message –
line 11, column 40: error: expected ‘}’
– internal assembly text –
OPTION NV_fragment_program2;

cgc version 1.3.0001, build date Jul 29 2005 13:26:34

command line args:

#vendor NVIDIA Corporation
#version 1.0.02
#profile fp40
#program main
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#const c[0] = 0,4 0,8 1
PARAM c[1] = { { 0,40000001, 0,80000001, 1 } };
MOVR result.color, c[0].xxyz;

1 instructions, 0 R-regs, 0 H-regs

Any ideas? Thanks for your help!

I just tried it and it seems to work. What os/drivers/card do you have. (Looks like a nvidia…)

I’m running Geforec 6800 77.72 drivers. (winXP)

I’ve seen that before. The decimal point is a comma in your system. There seems to be a problem with the functions generating the assembly code using the input language locales. Switch to English language until NVIDIA fixes it.

Thanks Relic! Switching to english fixed it. To be complete: it is a 7800 on linux with 76.76 drivers.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.