#osp: creating 'cylinders' geometry, #cylinders = 12 #osp: creating 'cylinders' geometry, #cylinders = 12 ERROR: In /.../PARAVIEW/src/ParaView-v5.1.0/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 378 vtkShaderProgram (0x4c97c60): 1: #version 150 2: #ifdef GL_ES 3: #if __VERSION__ == 300 4: #define varying in 5: #ifdef GL_FRAGMENT_PRECISION_HIGH 6: precision highp float; 7: precision highp sampler2D; 8: precision highp sampler3D; 9: #else 10: precision mediump float; 11: precision mediump sampler2D; 12: precision mediump sampler3D; 13: #endif 14: #define texelFetchBuffer texelFetch 15: #define texture1D texture 16: #define texture2D texture 17: #define texture3D texture 18: #endif // 300 19: #if __VERSION__ == 100 20: #extension GL_OES_standard_derivatives : enable 21: #ifdef GL_FRAGMENT_PRECISION_HIGH 22: precision highp float; 23: #else 24: precision mediump float; 25: #endif 26: #endif // 100 27: #else // GL_ES 28: #define highp 29: #define mediump 30: #define lowp 31: #if __VERSION__ == 150 32: #define varying in 33: #define texelFetchBuffer texelFetch 34: #define texture1D texture 35: #define texture2D texture 36: #define texture3D texture 37: #endif 38: #if __VERSION__ == 120 39: #extension GL_EXT_gpu_shader4 : require 40: #endif 41: #endif // GL_ES 42: 43: 44: /*========================================================================= 45: 46: Program: Visualization Toolkit 47: Module: vtkPolyDataFS.glsl 48: 49: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 50: All rights reserved. 51: See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 52: 53: This software is distributed WITHOUT ANY WARRANTY; without even 54: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 55: PURPOSE. See the above copyright notice for more information. 56: 57: =========================================================================*/ 58: // Template for the polydata mappers fragment shader 59: 60: uniform int PrimitiveIDOffset; 61: 62: // VC position of this fragment 63: //VTK::PositionVC::Dec 64: 65: // optional color passed in from the vertex shader, vertexColor 66: uniform bool OverridesColor; 67: uniform float opacityUniform; // the fragment opacity 68: uniform vec3 ambientColorUniform; // intensity weighted color 69: uniform vec3 diffuseColorUniform; // intensity weighted color 70: 71: 72: // optional surface normal declaration 73: //VTK::Normal::Dec 74: 75: // extra lighting parameters 76: //VTK::Light::Dec 77: float calcShadow(in vec4 vert, 78: in sampler2D shadowMap, 79: in mat4 shadowTransform, 80: in float attenuation) 81: { 82: vec4 shadowCoord = shadowTransform*vert; 83: float result = 1.0; 84: if(shadowCoord.w > 0.0) 85: { 86: vec2 projected = shadowCoord.xy/shadowCoord.w; 87: if(projected.x >= 0.0 && projected.x <= 1.0 88: && projected.y >= 0.0 && projected.y <= 1.0) 89: { 90: result = 0.0; 91: float zval = shadowCoord.z - 0.005; 92: vec2 projT = projected*1024; 93: projT = fract(projT); 94: if (texture2D(shadowMap,projected + (vec2(-1.0,-1.0)/1024)).r - zval > 0.0) { result = result + (1.0-projT.x)*(1.0-projT.y); } 95: if (texture2D(shadowMap,projected + (vec2(0.0,-1.0)/1024)).r - zval > 0.0) { result = result + (1.0-projT.y); } 96: if (texture2D(shadowMap,projected + (vec2(1.0,-1.0)/1024)).r - zval > 0.0) { result = result + projT.x*(1.0-projT.y); } 97: if (texture2D(shadowMap,projected + (vec2(1.0,0.0)/1024)).r - zval > 0.0) { result = result + projT.x; } 98: if (texture2D(shadowMap,projected + (vec2(0.0,0.0)/1024)).r - zval > 0.0) { result = result + 1.0; } 99: if (texture2D(shadowMap,projected + (vec2(-1.0,0.0)/1024)).r - zval > 0.0) { result = result + (1.0-projT.x); } 100: if (texture2D(shadowMap,projected + (vec2(0.0,1.0)/1024)).r - zval > 0.0) { result = result + projT.y; } 101: if (texture2D(shadowMap,projected + (vec2(-1.0,1.0)/1024)).r - zval > 0.0) { result = result + (1.0-projT.x)*projT.y; } 102: if (texture2D(shadowMap,projected + (vec2(1.0,1.0)/1024)).r - zval > 0.0) { result = result + projT.x*projT.y; } 103: result /= 4.0; 104: } 105: } 106: return (1.0 - attenuation + attenuation*result); 107: } 108: uniform float shadowAttenuation0; 109: uniform sampler2D shadowMap0; 110: uniform mat4 shadowTransform0; 111: uniform float shadowAttenuation1; 112: uniform sampler2D shadowMap1; 113: uniform mat4 shadowTransform1; 114: uniform float shadowAttenuation2; 115: uniform sampler2D shadowMap2; 116: uniform mat4 shadowTransform2; 117: uniform float shadowAttenuation3; 118: uniform sampler2D shadowMap3; 119: uniform mat4 shadowTransform3; 120: 121: 122: // Texture coordinates 123: //VTK::TCoord::Dec 124: 125: // picking support 126: //VTK::Picking::Dec 127: 128: // Depth Peeling Support 129: //VTK::DepthPeeling::Dec 130: 131: // clipping plane vars 132: //VTK::Clip::Dec 133: 134: // the output of this shader 135: out vec4 fragOutput0; 136: 137: 138: // Apple Bug 139: //VTK::PrimID::Dec 140: 141: // handle coincident offsets 142: uniform float cfactor; 143: uniform float coffset; 144: 145: void main() 146: { 147: // VC position of this fragment. This should not branch/return/discard. 148: //VTK::PositionVC::Impl 149: 150: // Place any calls that require uniform flow (e.g. dFdx) here. 151: float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z))); 152: gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset; 153: //VTK::UniformFlow::Impl 154: 155: 156: // Early depth peeling abort: 157: //VTK::DepthPeeling::PreColor 158: 159: // Apple Bug 160: //VTK::PrimID::Impl 161: 162: //VTK::Clip::Impl 163: 164: vec3 ambientColor; 165: vec3 diffuseColor; 166: float opacity; 167: ambientColor = ambientColorUniform; 168: diffuseColor = diffuseColorUniform; 169: opacity = opacityUniform; 170: 171: if (OverridesColor) { 172: ambientColor = ambientColorUniform; 173: diffuseColor = diffuseColorUniform; } 174: 175: 176: // Generate the normal if we are not passed in one 177: //VTK::Normal::Impl 178: 179: float factors[6]; 180: factors[0] = 1.0; 181: factors[1] = 1.0; 182: factors[2] = calcShadow(vertexVC, shadowMap0, shadowTransform0, shadowAttenuation0); 183: factors[3] = calcShadow(vertexVC, shadowMap1, shadowTransform1, shadowAttenuation1); 184: factors[4] = calcShadow(vertexVC, shadowMap2, shadowTransform2, shadowAttenuation2); 185: factors[5] = calcShadow(vertexVC, shadowMap3, shadowTransform3, shadowAttenuation3); 186: fragOutput0 = vec4(ambientColor + diffuseColor, opacity); 187: //VTK::Light::Impl 188: 189: 190: 191: //VTK::TCoord::Impl 192: 193: if (fragOutput0.a <= 0.0) 194: { 195: discard; 196: } 197: 198: //VTK::DepthPeeling::Impl 199: 200: //VTK::Picking::Impl 201: 202: // handle coincident offsets 203: //VTK::Coincident::Impl 204: } 205: ERROR: In /.../PARAVIEW/src/ParaView-v5.1.0/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 379 vtkShaderProgram (0x4c97c60): 0(182) : error C1008: undefined variable "vertexVC" 0(183) : error C1008: undefined variable "vertexVC" 0(184) : error C1008: undefined variable "vertexVC" 0(185) : error C1008: undefined variable "vertexVC"