Executing with: 0 ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/Rendering/vtkShaderProgram2.cxx, line 490 vtkShaderProgram2 (0x19b0870): the shader program failed to link. Its log is: Vertex info ----------- Internal error: assembly compile error for vertex shader at offset 17890: -- error message -- line 431, column 1: error: binding in multiple relative-addressedarrays -- internal assembly text -- !!NVvp4.0 OPTION NV_parameter_buffer_object2; # cgc version 3.0.0001, build date May 18 2010 # command line args: #vendor NVIDIA Corporation #version 3.0.0.1 #profile gp4vp #program main #semantic gl_NormalMatrix : state.matrix.modelview.inverse #semantic gl_ModelViewMatrix : state.matrix.modelview.transpose #semantic gl_ModelViewProjectionMatrixTranspose : state.matrix.mvp #semantic gl_FrontMaterial : state.material.front #semantic gl_LightModel : state.lightmodel #semantic gl_LightSource : state.light #semantic vtkColorMaterialHelper_Mode #var float4 gl_MultiTexCoord0 : $vin.TEXCOORD0 : ATTR8 : -1 : 1 #var float3x3 gl_NormalMatrix : state.matrix.modelview.inverse : c[0], 3 : -1 : 1 #var float4 gl_Position : $vout.POSITION : HPOS : -1 : 1 #var float3 gl_Normal : $vin.NORMAL : ATTR2 : -1 : 1 #var float4 gl_Vertex : $vin.POSITION : ATTR0 : -1 : 1 #var float4x4 gl_ModelViewMatrix : state.matrix.modelview.transpose : c[3], 4 : -1 : 1 #var float4x4 gl_ModelViewProjectionMatrixTranspose : state.matrix.mvp : c[7], 4 : -1 : 1 #var float4 gl_FrontMaterial.emission : state.material.front.emission : c[107] : -1 : 1 #var float4 gl_FrontMaterial.ambient : state.material.front.ambient : c[108] : -1 : 1 #var float4 gl_FrontMaterial.diffuse : state.material.front.diffuse : c[109] : -1 : 1 #var float4 gl_FrontMaterial.specular : state.material.front.specular : c[110] : -1 : 1 #var float gl_FrontMaterial.shininess : state.material.front.shininess : c[111] : -1 : 1 #var float4 gl_Color : $vin.COLOR0 : ATTR3 : -1 : 1 #var float4 gl_LightModel.ambient : state.lightmodel.ambient : c[112] : -1 : 1 #var float4 gl_LightSource[0].ambient : state.light[0].ambient : c[11] : -1 : 1 #var float4 gl_LightSource[0].diffuse : state.light[0].diffuse : c[12] : -1 : 1 #var float4 gl_LightSource[0].specular : state.light[0].specular : c[13] : -1 : 1 #var float4 gl_LightSource[0].position : state.light[0].position : c[14] : -1 : 1 #var float4 gl_LightSource[0].halfVector : state.light[0].half : c[15] : -1 : 0 #var float3 gl_LightSource[0].spotDirection : state.light[0].spot.direction : c[16] : -1 : 1 #var float gl_LightSource[0].spotExponent : state.light[0].attenuation.w : c[17] : -1 : 1 #var float gl_LightSource[0].spotCutoff : state.light[0].spot.cutoff.x : c[18] : -1 : 1 #var float gl_LightSource[0].spotCosCutoff : state.light[0].spot.direction.w : c[19] : -1 : 1 #var float gl_LightSource[0].constantAttenuation : state.light[0].attenuation.x : c[20] : -1 : 1 #var float gl_LightSource[0].linearAttenuation : state.light[0].attenuation.y : c[21] : -1 : 1 #var float gl_LightSource[0].quadraticAttenuation : state.light[0].attenuation.z : c[22] : -1 : 1 #var float4 gl_LightSource[1].ambient : state.light[1].ambient : c[23] : -1 : 1 #var float4 gl_LightSource[1].diffuse : state.light[1].diffuse : c[24] : -1 : 1 #var float4 gl_LightSource[1].specular : state.light[1].specular : c[25] : -1 : 1 #var float4 gl_LightSource[1].position : state.light[1].position : c[26] : -1 : 1 #var float4 gl_LightSource[1].halfVector : state.light[1].half : c[27] : -1 : 0 #var float3 gl_LightSource[1].spotDirection : state.light[1].spot.direction : c[28] : -1 : 1 #var float gl_LightSource[1].spotExponent : state.light[1].attenuation.w : c[29] : -1 : 1 #var float gl_LightSource[1].spotCutoff : state.light[1].spot.cutoff.x : c[30] : -1 : 1 #var float gl_LightSource[1].spotCosCutoff : state.light[1].spot.direction.w : c[31] : -1 : 1 #var float gl_LightSource[1].constantAttenuation : state.light[1].attenuation.x : c[32] : -1 : 1 #var float gl_LightSource[1].linearAttenuation : state.light[1].attenuation.y : c[33] : -1 : 1 #var float gl_LightSource[1].quadraticAttenuation : state.light[1].attenuation.z : c[34] : -1 : 1 #var float4 gl_LightSource[2].ambient : state.light[2].ambient : c[35] : -1 : 1 #var float4 gl_LightSource[2].diffuse : state.light[2].diffuse : c[36] : -1 : 1 #var float4 gl_LightSource[2].specular : state.light[2].specular : c[37] : -1 : 1 #var float4 gl_LightSource[2].position : state.light[2].position : c[38] : -1 : 1 #var float4 gl_LightSource[2].halfVector : state.light[2].half : c[39] : -1 : 0 #var float3 gl_LightSource[2].spotDirection : state.light[2].spot.direction : c[40] : -1 : 1 #var float gl_LightSource[2].spotExponent : state.light[2].attenuation.w : c[41] : -1 : 1 #var float gl_LightSource[2].spotCutoff : state.light[2].spot.cutoff.x : c[42] : -1 : 1 #var float gl_LightSource[2].spotCosCutoff : state.light[2].spot.direction.w : c[43] : -1 : 1 #var float gl_LightSource[2].constantAttenuation : state.light[2].attenuation.x : c[44] : -1 : 1 #var float gl_LightSource[2].linearAttenuation : state.light[2].attenuation.y : c[45] : -1 : 1 #var float gl_LightSource[2].quadraticAttenuation : state.light[2].attenuation.z : c[46] : -1 : 1 #var float4 gl_LightSource[3].ambient : state.light[3].ambient : c[47] : -1 : 1 #var float4 gl_LightSource[3].diffuse : state.light[3].diffuse : c[48] : -1 : 1 #var float4 gl_LightSource[3].specular : state.light[3].specular : c[49] : -1 : 1 #var float4 gl_LightSource[3].position : state.light[3].position : c[50] : -1 : 1 #var float4 gl_LightSource[3].halfVector : state.light[3].half : c[51] : -1 : 0 #var float3 gl_LightSource[3].spotDirection : state.light[3].spot.direction : c[52] : -1 : 1 #var float gl_LightSource[3].spotExponent : state.light[3].attenuation.w : c[53] : -1 : 1 #var float gl_LightSource[3].spotCutoff : state.light[3].spot.cutoff.x : c[54] : -1 : 1 #var float gl_LightSource[3].spotCosCutoff : state.light[3].spot.direction.w : c[55] : -1 : 1 #var float gl_LightSource[3].constantAttenuation : state.light[3].attenuation.x : c[56] : -1 : 1 #var float gl_LightSource[3].linearAttenuation : state.light[3].attenuation.y : c[57] : -1 : 1 #var float gl_LightSource[3].quadraticAttenuation : state.light[3].attenuation.z : c[58] : -1 : 1 #var float4 gl_LightSource[4].ambient : state.light[4].ambient : c[59] : -1 : 1 #var float4 gl_LightSource[4].diffuse : state.light[4].diffuse : c[60] : -1 : 1 #var float4 gl_LightSource[4].specular : state.light[4].specular : c[61] : -1 : 1 #var float4 gl_LightSource[4].position : state.light[4].position : c[62] : -1 : 1 #var float4 gl_LightSource[4].halfVector : state.light[4].half : c[63] : -1 : 0 #var float3 gl_LightSource[4].spotDirection : state.light[4].spot.direction : c[64] : -1 : 1 #var float gl_LightSource[4].spotExponent : state.light[4].attenuation.w : c[65] : -1 : 1 #var float gl_LightSource[4].spotCutoff : state.light[4].spot.cutoff.x : c[66] : -1 : 1 #var float gl_LightSource[4].spotCosCutoff : state.light[4].spot.direction.w : c[67] : -1 : 1 #var float gl_LightSource[4].constantAttenuation : state.light[4].attenuation.x : c[68] : -1 : 1 #var float gl_LightSource[4].linearAttenuation : state.light[4].attenuation.y : c[69] : -1 : 1 #var float gl_LightSource[4].quadraticAttenuation : state.light[4].attenuation.z : c[70] : -1 : 1 #var float4 gl_LightSource[5].ambient : state.light[5].ambient : c[71] : -1 : 1 #var float4 gl_LightSource[5].diffuse : state.light[5].diffuse : c[72] : -1 : 1 #var float4 gl_LightSource[5].specular : state.light[5].specular : c[73] : -1 : 1 #var float4 gl_LightSource[5].position : state.light[5].position : c[74] : -1 : 1 #var float4 gl_LightSource[5].halfVector : state.light[5].half : c[75] : -1 : 0 #var float3 gl_LightSource[5].spotDirection : state.light[5].spot.direction : c[76] : -1 : 1 #var float gl_LightSource[5].spotExponent : state.light[5].attenuation.w : c[77] : -1 : 1 #var float gl_LightSource[5].spotCutoff : state.light[5].spot.cutoff.x : c[78] : -1 : 1 #var float gl_LightSource[5].spotCosCutoff : state.light[5].spot.direction.w : c[79] : -1 : 1 #var float gl_LightSource[5].constantAttenuation : state.light[5].attenuation.x : c[80] : -1 : 1 #var float gl_LightSource[5].linearAttenuation : state.light[5].attenuation.y : c[81] : -1 : 1 #var float gl_LightSource[5].quadraticAttenuation : state.light[5].attenuation.z : c[82] : -1 : 1 #var float4 gl_LightSource[6].ambient : state.light[6].ambient : c[83] : -1 : 1 #var float4 gl_LightSource[6].diffuse : state.light[6].diffuse : c[84] : -1 : 1 #var float4 gl_LightSource[6].specular : state.light[6].specular : c[85] : -1 : 1 #var float4 gl_LightSource[6].position : state.light[6].position : c[86] : -1 : 1 #var float4 gl_LightSource[6].halfVector : state.light[6].half : c[87] : -1 : 0 #var float3 gl_LightSource[6].spotDirection : state.light[6].spot.direction : c[88] : -1 : 1 #var float gl_LightSource[6].spotExponent : state.light[6].attenuation.w : c[89] : -1 : 1 #var float gl_LightSource[6].spotCutoff : state.light[6].spot.cutoff.x : c[90] : -1 : 1 #var float gl_LightSource[6].spotCosCutoff : state.light[6].spot.direction.w : c[91] : -1 : 1 #var float gl_LightSource[6].constantAttenuation : state.light[6].attenuation.x : c[92] : -1 : 1 #var float gl_LightSource[6].linearAttenuation : state.light[6].attenuation.y : c[93] : -1 : 1 #var float gl_LightSource[6].quadraticAttenuation : state.light[6].attenuation.z : c[94] : -1 : 1 #var float4 gl_LightSource[7].ambient : state.light[7].ambient : c[95] : -1 : 1 #var float4 gl_LightSource[7].diffuse : state.light[7].diffuse : c[96] : -1 : 1 #var float4 gl_LightSource[7].specular : state.light[7].specular : c[97] : -1 : 1 #var float4 gl_LightSource[7].position : state.light[7].position : c[98] : -1 : 1 #var float4 gl_LightSource[7].halfVector : state.light[7].half : c[99] : -1 : 0 #var float3 gl_LightSource[7].spotDirection : state.light[7].spot.direction : c[100] : -1 : 1 #var float gl_LightSource[7].spotExponent : state.light[7].attenuation.w : c[101] : -1 : 1 #var float gl_LightSource[7].spotCutoff : state.light[7].spot.cutoff.x : c[102] : -1 : 1 #var float gl_LightSource[7].spotCosCutoff : state.light[7].spot.direction.w : c[103] : -1 : 1 #var float gl_LightSource[7].constantAttenuation : state.light[7].attenuation.x : c[104] : -1 : 1 #var float gl_LightSource[7].linearAttenuation : state.light[7].attenuation.y : c[105] : -1 : 1 #var float gl_LightSource[7].quadraticAttenuation : state.light[7].attenuation.z : c[106] : -1 : 1 #var float4 vColor : $vout.ATTR1 : ATTR1 : -1 : 1 #var float2 vProjectedVF : $vout.ATTR0.xy : ATTR0 : -1 : 1 #var int vtkColorMaterialHelper_Mode : : c[113] : -1 : 1 PARAM c[114] = { state.matrix.modelview.inverse.row[0..2], state.matrix.modelview.transpose.row[0..3], state.matrix.mvp.row[0..3], state.light[0].ambient, state.light[0].diffuse, state.light[0].specular, state.light[0].position, program.local[15], state.light[0].spot.direction, state.light[0].attenuation, state.light[0].spot.cutoff, state.light[0].spot.direction, state.light[0].attenuation, state.light[0].attenuation, state.light[0].attenuation, state.light[1].ambient, state.light[1].diffuse, state.light[1].specular, state.light[1].position, program.local[27], state.light[1].spot.direction, state.light[1].attenuation, state.light[1].spot.cutoff, state.light[1].spot.direction, state.light[1].attenuation, state.light[1].attenuation, state.light[1].attenuation, state.light[2].ambient, state.light[2].diffuse, state.light[2].specular, state.light[2].position, program.local[39], state.light[2].spot.direction, state.light[2].attenuation, state.light[2].spot.cutoff, state.light[2].spot.direction, state.light[2].attenuation, state.light[2].attenuation, state.light[2].attenuation, state.light[3].ambient, state.light[3].diffuse, state.light[3].specular, state.light[3].position, program.local[51], state.light[3].spot.direction, state.light[3].attenuation, state.light[3].spot.cutoff, state.light[3].spot.direction, state.light[3].attenuation, state.light[3].attenuation, state.light[3].attenuation, state.light[4].ambient, state.light[4].diffuse, state.light[4].specular, state.light[4].position, program.local[63], state.light[4].spot.direction, state.light[4].attenuation, state.light[4].spot.cutoff, state.light[4].spot.direction, state.light[4].attenuation, state.light[4].attenuation, state.light[4].attenuation, state.light[5].ambient, state.light[5].diffuse, state.light[5].specular, state.light[5].position, program.local[75], state.light[5].spot.direction, state.light[5].attenuation, state.light[5].spot.cutoff, state.light[5].spot.direction, state.light[5].attenuation, state.light[5].attenuation, state.light[5].attenuation, state.light[6].ambient, state.light[6].diffuse, state.light[6].specular, state.light[6].position, program.local[87], state.light[6].spot.direction, state.light[6].attenuation, state.light[6].spot.cutoff, state.light[6].spot.direction, state.light[6].attenuation, state.light[6].attenuation, state.light[6].attenuation, state.light[7].ambient, state.light[7].diffuse, state.light[7].specular, state.light[7].position, program.local[99], state.light[7].spot.direction, state.light[7].attenuation, state.light[7].spot.cutoff, state.light[7].spot.direction, state.light[7].attenuation, state.light[7].attenuation, state.light[7].attenuation, state.material.front.emission, state.material.front.ambient, state.material.front.diffuse, state.material.front.specular, state.material.front.shininess, state.lightmodel.ambient, program.local[113] }; ATTRIB vertex_attrib[] = { vertex.attrib[0..8] }; OUTPUT result_attrib[] = { result.attrib[0..1] }; TEMP R0, R1, R2, R3, R4, R5, R6, R7, R8, R9; TEMP RC, HC; DP3.F R4.x, vertex.attrib[2], vertex.attrib[2]; RSQ.F R4.x, R4.x; MUL.F R4.xyz, R4.x, vertex.attrib[2]; DP3.F R4.w, R4, vertex.attrib[8]; MAD.F R4.xyz, -R4.w, R4, vertex.attrib[8]; MUL.F R5.xy, R4.y, c[1]; MAD.F R4.xy, R4.x, c[0], R5; MAD.F result.attrib[0].xy, R4.z, c[2], R4; MUL.F R4, vertex.attrib[0].y, c[4]; MUL.F R5.xyz, vertex.attrib[2].y, c[1]; MAD.F R4, vertex.attrib[0].x, c[3], R4; MAD.F R5.xyz, vertex.attrib[2].x, c[0], R5; MAD.F R5.xyz, vertex.attrib[2].z, c[2], R5; MAD.F R4, vertex.attrib[0].z, c[5], R4; MAD.F R4, vertex.attrib[0].w, c[6], R4; DIV.F R7.xyz, R4, R4.w; DP3.F R5.w, R5, R5; RSQ.F R4.x, R5.w; MOV.S R4.y, {0, 0, 0, 0}.x; MUL.F R8.xyz, R4.x, R5; SEQ.S R4.y, c[113].x, R4; MOV.U.CC RC.x, -R4.y; MOV.U R4.x, {1, 0, 0, 0}; IF NE.x; MOV.F R3, c[107]; MOV.F R0, c[108]; MOV.F R1, c[109]; MOV.F R2, c[110]; MOV.U R4.x, {0, 0, 0, 0}; ENDIF; MOV.U.CC RC.x, R4; IF NE.x; MOV.S R2.x, {1, 0, 0, 0}; SEQ.S R4.x, c[113], R2; MOV.U.CC RC.x, -R4; MOV.F R3, c[107]; MOV.F R0, c[108]; MOV.F R1, c[109]; MOV.F R2, c[110]; IF NE.x; MOV.F R0, vertex.attrib[3]; ELSE; MOV.S R4.x, {2, 0, 0, 0}; SEQ.S R4.x, c[113], R4; MOV.U.CC RC.x, -R4; IF NE.x; MOV.F R1, vertex.attrib[3]; ELSE; MOV.S R4.x, {3, 0, 0, 0}; SEQ.S R4.x, c[113], R4; MOV.U.CC RC.x, -R4; IF NE.x; MOV.F R2, vertex.attrib[3]; ELSE; MOV.S R4.x, {4, 0, 0, 0}; SEQ.S R4.x, c[113], R4; MOV.U.CC RC.x, -R4; IF NE.x; MOV.F R0, vertex.attrib[3]; MOV.F R1, vertex.attrib[3]; ELSE; MOV.S R4.x, {5, 0, 0, 0}; SEQ.S R4.x, c[113], R4; MOV.U.CC RC.x, -R4; IF NE.x; MOV.F R3, vertex.attrib[3]; ENDIF; ENDIF; ENDIF; ENDIF; ENDIF; ENDIF; MAD.F R3, R0, c[112], R3; MOV.F R4, {0, 1, 0, 0}.xxxy; MOV.S R7.w, {0, 0, 0, 0}.x; REP.S {8, 0, 0, 0}; MUL.S R5.y, R7.w, {12, 0, 0, 0}.x; MOV.F R5.x, {0, 0, 0, 0}; MOV.U R5.y, R5; SNE.F R5.x, c[R5.y + 12].w, R5; TRUNC.U R5.x, R5; SEQ.U R5.x, R5, {0, 0, 0, 0}; MOV.U.CC RC.x, -R5; IF NE.x; MOV.U.CC RC.x, {1, 0, 0, 0}; ADD.S R7.w, R7, {1, 0, 0, 0}.x; CONT (NE.x); ENDIF; MUL.S R5.y, R7.w, {12, 0, 0, 0}.x; MOV.F R5.x, {0, 0, 0, 0}; MOV.U R5.y, R5; SNE.F R5.x, c[R5.y + 14].w, R5; TRUNC.U.CC HC.x, R5; IF NE.x; MUL.S R5.x, R7.w, {12, 0, 0, 0}; MOV.U R5.w, R5.x; RCP.F R5.x, c[R5.w + 14].w; MAD.F R5.xyz, R5.x, c[R5.w + 14], -R7; DP3.F R6.w, R5, R5; RSQ.F R6.x, R6.w; RCP.F R8.w, R6.x; MUL.F R9.x, c[R5.w + 21].y, R8.w; MUL.F R5.xyz, R6.x, R5; ADD.F R6.xyz, R5, R7; DP3.F R8.w, R6, R6; RSQ.F R8.w, R8.w; ADD.F R9.x, R9, c[R5.w + 20]; MAD.F R5.w, R6, c[R5.w + 22].z, R9.x; MUL.F R6.xyz, R8.w, R6; RCP.F R8.w, R5.w; ELSE; MUL.S R5.x, R7.w, {12, 0, 0, 0}; MOV.U R5.x, R5; DP3.F R5.y, c[R5.x + 14], c[R5.x + 14]; RSQ.F R5.y, R5.y; MUL.F R5.xyz, R5.y, c[R5.x + 14]; ADD.F R6.xyz, R5, R7; DP3.F R5.w, R6, R6; RSQ.F R5.w, R5.w; MUL.F R6.xyz, R5.w, R6; MOV.F R8.w, {1, 0, 0, 0}.x; ENDIF; SGT.F R5.w, R8, {0, 0, 0, 0}.x; TRUNC.U.CC HC.x, R5.w; IF NE.x; MUL.S R6.w, R7, {12, 0, 0, 0}.x; MOV.F R5.w, {180, 0, 0, 0}.x; MOV.U R6.w, R6; SEQ.F R5.w, c[R6.w + 18].x, R5; TRUNC.U.CC HC.x, R5.w; IF NE.x; MOV.F R9.x, {1, 0, 0, 0}; ELSE; MUL.S R5.w, R7, {12, 0, 0, 0}.x; MOV.U R5.w, R5; DP3.F R6.w, R5, c[R5.w + 16]; SGE.F R9.x, -R6.w, c[R5.w + 19].w; TRUNC.U.CC HC.x, R9; MOV.F R5.w, -R6; IF NE.x; MUL.S R6.w, R7, {12, 0, 0, 0}.x; MOV.U R6.w, R6; POW.F R9.x, R5.w, c[R6.w + 17].w; ELSE; MOV.F R9.x, {0, 0, 0, 0}; ENDIF; ENDIF; SGT.F R5.w, R9.x, {0, 0, 0, 0}.x; TRUNC.U.CC HC.x, R5.w; IF NE.x; DP3.F R9.z, R8, R5; SLT.F R5.x, R9.z, {0, 0, 0, 0}; TRUNC.U.CC HC.x, R5; DP3.F R9.y, R8, R6; IF NE.x; MOV.F R9.z, -R9; ENDIF; SLT.F R5.x, R9.y, {0, 0, 0, 0}; TRUNC.U.CC HC.x, R5; IF NE.x; MOV.F R9.y, -R9; ENDIF; MUL.S R5.x, R7.w, {12, 0, 0, 0}; MOV.U R5.x, R5; SGT.F R6.x, R9.z, {0, 0, 0, 0}; TRUNC.U.CC HC.x, R6; MUL.F R5, R0, c[R5.x + 11]; IF NE.x; MUL.S R6.x, R7.w, {12, 0, 0, 0}; MOV.U R6.x, R6; MUL.F R6, R1, c[R6.x + 12]; MAD.F R5, R6, R9.z, R5; ENDIF; MUL.F R6.x, R8.w, R9; MAD.F R3, R6.x, R5, R3; MUL.F R5, R6.x, R2; MUL.S R6.y, R7.w, {12, 0, 0, 0}.x; MOV.U R6.y, R6; POW.F R6.x, R9.y, c[111].x; MUL.F R5, R5, c[R6.y + 13]; MAD.F R4, R5, R6.x, R4; ENDIF; ENDIF; ADD.S R7.w, R7, {1, 0, 0, 0}.x; ENDREP; ADD.F result.attrib[1], R3, R4; DP4.F result.position.w, vertex.attrib[0], c[10]; DP4.F result.position.z, vertex.attrib[0], c[9]; DP4.F result.position.y, vertex.attrib[0], c[8]; DP4.F result.position.x, vertex.attrib[0], c[7]; END # 190 instructions, 10 R-regs the shaders are: ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/Rendering/vtkShaderProgram2.cxx, line 500 vtkShaderProgram2 (0x19b0870): shader #0/4 (vertex shader) log is: . Its source code is: //========================================================================= // // Program: Visualization Toolkit // Module: vtkSurfaceLICPainter_vs1.glsl // // Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen // All rights reserved. // See Copyright.txt or http://www.kitware.com/Copyright.htm for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notice for more information. // //========================================================================= // Filename: vtkSurfaceLICPainter_vs1.glsl // Filename is useful when using gldb-gui #version 120 varying vec4 vColor; varying vec2 vProjectedVF; // from vtkColorMaterialHelper gl_MaterialParameters getMaterialParameters(); // from vtkLightingHelper vec4 singleColor(gl_MaterialParameters m, vec3 surfacePosEyeCoords, vec3 n); // Projects "vector" onto the surface. vec3 projectOnSurface(vec3 vector) { vec3 normal = normalize(gl_Normal); float k = dot(normal, vector); return (vector - (k*normal)); } vec4 colorFrontFace() { vec4 heyeCoords = gl_ModelViewMatrix*gl_Vertex; vec3 eyeCoords = heyeCoords.xyz/heyeCoords.w; vec3 n = normalize(gl_NormalMatrix*gl_Normal); return singleColor(getMaterialParameters(),eyeCoords,n); } void main() { vec3 vf = projectOnSurface(gl_MultiTexCoord0.stp); vProjectedVF = (gl_NormalMatrix * vf).xy; vColor = colorFrontFace(); gl_Position = ftransform(); } ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/Rendering/vtkShaderProgram2.cxx, line 500 vtkShaderProgram2 (0x19b0870): shader #1/4 (fragment shader) log is: . Its source code is: //========================================================================= // // Program: Visualization Toolkit // Module: vtkSurfaceLICPainter_fs1.glsl // // Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen // All rights reserved. // See Copyright.txt or http://www.kitware.com/Copyright.htm for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notice for more information. // //========================================================================= // Filename: vtkSurfaceLICPainter_fs1.glsl // Filename is useful when using gldb-gui #version 110 #extension GL_ARB_draw_buffers : enable varying vec2 vProjectedVF; varying vec4 vColor; void main() { gl_FragData[0] = clamp(vColor, vec4(0,0, 0, 0), vec4(1, 1, 1, 1));; gl_FragData[1] = vec4(vProjectedVF.x, vProjectedVF.y, gl_FragCoord.z, 1.0); } ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/Rendering/vtkShaderProgram2.cxx, line 500 vtkShaderProgram2 (0x19b0870): shader #2/4 (vertex shader) log is: . Its source code is: //========================================================================= // // Program: Visualization Toolkit // Module: vtkLightingHelper_s.glsl // // Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen // All rights reserved. // See Copyright.txt or http://www.kitware.com/Copyright.htm for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notice for more information. // //========================================================================= #version 110 // Filename: vtkLightingHelper_s.glsl // Filename is useful when using gldb-gui // This file defines some lighting functions. // They can be used either in a vertex or fragment shader. // It is intented to be used in conjunction with vtkLightsSwitches class. // Those functions expect uniform variables about the status of lights // 1. In fixed-mode pipeline (glUseProgram(0)), // 2. get the values with GLboolean lightSwitch[i]=glIsEnabled(GL_LIGHTi); // 3. Switch to programmable pipeline (glUseProgram(prog)) // 4. Send boolean as uniform: var=glGetUniformLocation(prog,"lightSwitch[i]"); // 5. glUniform1i(var,lightSwitch[i]); // vtkLightsSwitches class can do that for you. // Example in vertex shader: // Reminder: two-sided/one-sided is controlled by GL_VERTEX_PROGRAM_TWO_SIDE // // vec4 eyeCoords=gl_ModelViewMatrix*gl_Vertex; // vec4 n=gl_Normalmatrix*gl_Normal; // n=normalize(n); // separateSpecularColor(gl_FrontMaterial,eyeCoords,n,gl_FrontColor,gl_FrontSecondaryColor); // If two-sided. // separateSpecularColor(gl_BackMaterial,eyeCoords,n,gl_BackColor,gl_BackSecondaryColor); // Typical: // gl_FrontColor=singleColor(gl_FrontMaterial,eyeCoords,n); // This is convenience method to use in shader but you better do // this computation on the CPU and send the result as a uniform. // True if any enabled light is a positional one. bool needSurfacePositionInEyeCoordinates() { bool result=false; for (int i=0; !result && (i < gl_MaxLights); i++) { result = (gl_LightSource[i].diffuse.w != 0.0) && (gl_LightSource[i].position.w != 0.0); } return result; } // Lighting computation based on a material m, // a position on the surface expressed in eye coordinate (typically a vertex // position in a vertex shader, something interpolated in a fragment shader), // a unit normal `n' to the surface in eye coordinates. // Most of the components are in cpri (primary color), the specular // component is in csec (secondary color). // Useful for blending color and textures. void separateSpecularColor(gl_MaterialParameters m, vec3 surfacePosEyeCoords, vec3 n, out vec4 cpri, out vec4 csec) { cpri = m.emission + m.ambient * gl_LightModel.ambient; // ecm+acm*acs csec = vec4(0.0,0.0,0.0,1.0); vec3 wReverseRayDir = surfacePosEyeCoords; // For each light, for (int i=0; i < gl_MaxLights; i++) { // Trick. bool lightEnabled = (gl_LightSource[i].diffuse.w != 0.0); if (!lightEnabled) { continue; } vec3 ldir; vec3 h; float att; float spot; float shininessFactor; if (gl_LightSource[i].position.w != 0.0) { // ldir=light direction vec3 lightPos=gl_LightSource[i].position.xyz/ gl_LightSource[i].position.w; ldir = lightPos - surfacePosEyeCoords; float sqrDistance = dot(ldir,ldir); ldir = normalize(ldir); h = normalize(ldir + wReverseRayDir); att = 1.0 / (gl_LightSource[i].constantAttenuation + gl_LightSource[i].linearAttenuation * sqrt(sqrDistance) + gl_LightSource[i].quadraticAttenuation * sqrDistance); } else { att = 1.0; ldir = gl_LightSource[i].position.xyz; ldir = normalize(ldir); h = normalize(ldir + wReverseRayDir); } if (att>0.0) { if (gl_LightSource[i].spotCutoff == 180.0) { spot = 1.0; } else { float coef=-dot(ldir,gl_LightSource[i].spotDirection); if (coef>=gl_LightSource[i].spotCosCutoff) { spot=pow(coef,gl_LightSource[i].spotExponent); } else { spot=0.0; } } if (spot>0.0) { // LIT operation... float nDotL=dot(n,ldir); float nDotH=dot(n,h); // separate nDotL and nDotH for two-sided shading, otherwise we // get black spots. if (nDotL<0.0) // two-sided shading { nDotL=-nDotL; } if (nDotH<0.0) // two-sided shading { nDotH=-nDotH; } // ambient term for this light vec4 cpril=m.ambient*gl_LightSource[i].ambient;// acm*adi // diffuse term for this light if (nDotL>0.0) { cpril+=m.diffuse*gl_LightSource[i].diffuse*nDotL; // dcm*dcli } // specular term for this light shininessFactor=pow(nDotH,m.shininess); // srm cpri+=att*spot*cpril; // scm*scli csec+=att*spot* m.specular*gl_LightSource[i].specular*shininessFactor; } } } } // Lighting computation based on a material m, // a position on the surface expressed in eye coordinate (typically a vertex // position in a vertex shader, something interpolated in a fragment shader), // a unit normal to the surface in eye coordinates. // The result includes the specular component. vec4 singleColor(gl_MaterialParameters m, vec3 surfacePosEyeCoords, vec3 n) { vec4 cpri; vec4 csec; separateSpecularColor(m,surfacePosEyeCoords,n,cpri,csec); return cpri+csec; } ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/Rendering/vtkShaderProgram2.cxx, line 500 vtkShaderProgram2 (0x19b0870): shader #3/4 (vertex shader) log is: . Its source code is: //========================================================================= // // Program: Visualization Toolkit // Module: vtkColorMaterialHelper_vs.glsl // // Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen // All rights reserved. // See Copyright.txt or http://www.kitware.com/Copyright.htm for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notice for more information. // //========================================================================= // Id: Id #version 110 #define GL_AMBIENT 1 #define GL_DIFFUSE 2 #define GL_SPECULAR 3 #define GL_AMBIENT_AND_DIFFUSE 4 #define GL_EMISSION 5 uniform int vtkColorMaterialHelper_Mode; gl_MaterialParameters getMaterialParameters() { if (vtkColorMaterialHelper_Mode == 0) { return gl_FrontMaterial; } gl_MaterialParameters materialParams = gl_FrontMaterial; if (vtkColorMaterialHelper_Mode == GL_AMBIENT) { materialParams.ambient = gl_Color; } else if (vtkColorMaterialHelper_Mode == GL_DIFFUSE) { materialParams.diffuse = gl_Color; } else if (vtkColorMaterialHelper_Mode == GL_SPECULAR) { materialParams.specular = gl_Color; } else if (vtkColorMaterialHelper_Mode == GL_AMBIENT_AND_DIFFUSE) { materialParams.ambient = gl_Color; materialParams.diffuse = gl_Color; } else if (vtkColorMaterialHelper_Mode == GL_EMISSION) { materialParams.emission = gl_Color; } return materialParams; } ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/Rendering/vtkSurfaceLICPainter.cxx, line 610 vtkSurfaceLICPainter (0x22239d0): Pass One failed.