hillar
02-02-2005, 06:39 AM
Hello
I have a strange Problem here. If i use this simple Fragment-Shader:
varying vec4 shaded_color;
void main(void) {
gl_FragColor = shaded_color;
}everything works fine. Do i change it like this
varying vec4 shaded_color;
void main(void) {
mat4 test = mat4(
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
);
vec4 textVec = test * gl_FragCoord;
gl_FragColor = shaded_color;
}all i get is a black window. It doesn't matter what matrix i multiply with what vector or if they are 2, 3 or 4 dimensional. If i multipy a matrix with a vector, the fragment-shader seems to discard the fragment. But i dont get any errormessage.
I use Gentoo-Linux with a Radeon 9600Pro and latest ATI-drivers.
Any Idea?
I have a strange Problem here. If i use this simple Fragment-Shader:
varying vec4 shaded_color;
void main(void) {
gl_FragColor = shaded_color;
}everything works fine. Do i change it like this
varying vec4 shaded_color;
void main(void) {
mat4 test = mat4(
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
);
vec4 textVec = test * gl_FragCoord;
gl_FragColor = shaded_color;
}all i get is a black window. It doesn't matter what matrix i multiply with what vector or if they are 2, 3 or 4 dimensional. If i multipy a matrix with a vector, the fragment-shader seems to discard the fragment. But i dont get any errormessage.
I use Gentoo-Linux with a Radeon 9600Pro and latest ATI-drivers.
Any Idea?