I am getting the following error while running osgvolume.exe with
--shader parameter.
Adding ""#version 110" on top of the vertex shader code resolves the
error. But what about fragment shader problems...
I am using OSG_RELEASE.2.1.5 with NVIDIA 8800GTS card
glLinkProgram "" FAILED
Program "" infolog:
Vertex info
-----------
(8) : warning C7532: global variable gl_ModelViewMatrixInverse requires "#versio
n 110" before use
(8) : warning C7011: implicit cast from "vec4" to "vec3"
(8) : warning C7011: implicit cast from "vec4" to "vec3"
Fragment info
-------------
(25) : warning C7504: OpenGL does not allow writing to input variable 'texcoord'
Internal error: assembly compile error for fragment shader at offset 1726:
-- error message --
line 65, column 13: error: variable not valid as a source register
-- internal assembly text --
!!NVfp4.0
# cgc version 2.0.0001, build date Apr 20 2007 06:21:05
# command line args:
#vendor NVIDIA Corporation
#version 2.0.0.1
#profile gp4fp
#program main
#semantic baseTexture
#semantic sampleDensity
#semantic transparency
#semantic alphaCutOff
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var sampler3D baseTexture : : texunit 0 : -1 : 1
#var float sampleDensity : : c[0] : -1 : 1
#var float transparency : : c[1] : -1 : 1
#var float alphaCutOff : : c[2] : -1 : 1
#var float3 deltaTexCoord : $vin.ATTR0 : ATTR0 : -1 : 1
#var float3 texcoord : $vin.ATTR1 : ATTR1 : -1 : 1
PARAM c[3] = { program.local[0..2] };
ATTRIB fragment_attrib[] = { fragment.attrib[0..1] };
TEMP R0, R1, R2, R3;
TEMP RC, HC;
OUTPUT oCol = result.color;
DP3.F R0.x, fragment.attrib[0], fragment.attrib[0];
RSQ.F R0.x, R0.x;
MUL.F R0.xyz, R0.x, fragment.attrib[0];
MOV.F R1, {0, 0, 0, 0}.x;
MOV.F oCol, {0, 0, 0, 0}.x;
MOV.F R2.xyz, fragment.attrib[1];
MUL.F R3.xyz, R0, c[0].x;
REP.S ;
SLE.F R0.y, R2.x, {1, 0, 0, 0}.x;
SGE.F R0.x, R2, {0, 0, 0, 0};
SLE.F R0.z, R2.y, {1, 0, 0, 0}.x;
TRUNC.U R0.y, R0;
TRUNC.U R0.x, R0;
AND.U R0.x, R0, R0.y;
SGE.F R0.y, R2, {0, 0, 0, 0}.x;
TRUNC.U R0.y, R0;
AND.U R0.x, R0, R0.y;
TRUNC.U R0.z, R0;
AND.U R0.x, R0, R0.z;
SGE.F R0.y, R2.z, {0, 0, 0, 0}.x;
SLE.F R0.z, R2, {1, 0, 0, 0}.x;
TRUNC.U R0.y, R0;
TRUNC.U R0.z, R0;
AND.U R0.x, R0, R0.y;
AND.U R0.x, R0, R0.z;
SEQ.U R0.x, R0, {0, 0, 0, 0};
MOV.U.CC RC.x, -R0;
BRK (GT.x);
TEX R0, R2, texture[0], 3D;
MUL.F R2.w, R0, c[1].x;
SGT.F R0.w, R2, c[2].x;
TRUNC.U.CC HC.x, R0.w;
IF NE.x;
MAD.F R1.xyz, -R2.w, R1, R1;
ADD.F R0.w, R1, R2;
MAD.F R0.xyz, R2.w, R0, R1;
MOV.F R1, R0;
MOV.F oCol, R0;
ENDIF;
ADD.F R2.xyz, R2, R3;
ENDREP;
SGT.F R0.x, oCol.w, {1, 0, 0, 0};
TRUNC.U.CC HC.x, R0;
IF NE.x;
MOV.F oCol.w, {1, 0, 0, 0}.x;
ENDIF;
END
# 46 instructions, 4 R-regs
Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,)
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org