PDA

View Full Version : The most simple fragment shader...



Ferenzzy
10-06-2005, 11:58 AM
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 --
!!ARBfp1.0
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 } };
TEMP RC;
TEMP HC;
MOVR result.color, c[0].xxyz;
END
# 1 instructions, 0 R-regs, 0 H-regs

Any ideas? Thanks for your help!

sqrt[-1]
10-06-2005, 06:03 PM
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)

Relic
10-06-2005, 09:52 PM
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.

Ferenzzy
10-06-2005, 10:34 PM
Thanks Relic! Switching to english fixed it. To be complete: it is a 7800 on linux with 76.76 drivers.