Advertisement
Guest User

Untitled

a guest
Dec 8th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.03 KB | None | 0 0
  1. Navigated to https://threejs.org/examples/?q=curve#webgl_modifier_curve
  2. [native code]:1 WebGL: ERROR: 0:293: 'texture' : no matching overloaded function foundcompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  3. [native code]:1 WebGL: ERROR: 0:293: 'xyz' : field selection requires structure or vector on left hand sidecompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  4. [native code]:1 WebGL: ERROR: 0:293: '=' : dimension mismatchcompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  5. [native code]:1 WebGL: ERROR: 0:293: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'compileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  6. [native code]:1 WebGL: ERROR: 0:294: 'texture' : no matching overloaded function foundcompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  7. [native code]:1 WebGL: ERROR: 0:294: 'xyz' : field selection requires structure or vector on left hand sidecompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  8. [native code]:1 WebGL: ERROR: 0:294: '=' : dimension mismatchcompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  9. [native code]:1 WebGL: ERROR: 0:294: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'compileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  10. [native code]:1 WebGL: ERROR: 0:295: 'texture' : no matching overloaded function foundcompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  11. [native code]:1 WebGL: ERROR: 0:295: 'xyz' : field selection requires structure or vector on left hand sidecompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  12. [native code]:1 WebGL: ERROR: 0:295: '=' : dimension mismatchcompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  13. [native code]:1 WebGL: ERROR: 0:295: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'compileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  14. [native code]:1 WebGL: ERROR: 0:296: 'texture' : no matching overloaded function foundcompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  15. [native code]:1 WebGL: ERROR: 0:296: 'xyz' : field selection requires structure or vector on left hand sidecompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  16. [native code]:1 WebGL: ERROR: 0:296: '=' : dimension mismatchcompileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  17. [native code]:1 WebGL: ERROR: 0:296: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'compileShader @ [native code]:1WebGLShader @ three.module.js:16688WebGLProgram @ three.module.js:17394acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  18. three.module.js:17432 THREE.WebGLProgram: shader error: 0 35715 false gl.getProgramInfoLog THREE.WebGLShader: gl.getShaderInfoLog() vertex
  19. ERROR: 0:293: 'texture' : no matching overloaded function found
  20. ERROR: 0:293: 'xyz' : field selection requires structure or vector on left hand side
  21. ERROR: 0:293: '=' : dimension mismatch
  22. ERROR: 0:293: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'
  23. ERROR: 0:294: 'texture' : no matching overloaded function found
  24. ERROR: 0:294: 'xyz' : field selection requires structure or vector on left hand side
  25. ERROR: 0:294: '=' : dimension mismatch
  26. ERROR: 0:294: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'
  27. ERROR: 0:295: 'texture' : no matching overloaded function found
  28. ERROR: 0:295: 'xyz' : field selection requires structure or vector on left hand side
  29. ERROR: 0:295: '=' : dimension mismatch
  30. ERROR: 0:295: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'
  31. ERROR: 0:296: 'texture' : no matching overloaded function found
  32. ERROR: 0:296: 'xyz' : field selection requires structure or vector on left hand side
  33. ERROR: 0:296: '=' : dimension mismatch
  34. ERROR: 0:296: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'1: precision highp float;
  35. 2: precision highp int;
  36. 3: #define HIGH_PRECISION
  37. 4: #define SHADER_NAME MeshStandardMaterial
  38. 5: #define STANDARD
  39. 6: #define VERTEX_TEXTURES
  40. 7: #define GAMMA_FACTOR 2
  41. 8: #define MAX_BONES 0
  42. 9: #define BONE_TEXTURE
  43. 10: uniform mat4 modelMatrix;
  44. 11: uniform mat4 modelViewMatrix;
  45. 12: uniform mat4 projectionMatrix;
  46. 13: uniform mat4 viewMatrix;
  47. 14: uniform mat3 normalMatrix;
  48. 15: uniform vec3 cameraPosition;
  49. 16: uniform bool isOrthographic;
  50. 17: #ifdef USE_INSTANCING
  51. 18: attribute mat4 instanceMatrix;
  52. 19: #endif
  53. 20: #ifdef USE_INSTANCING_COLOR
  54. 21: attribute vec3 instanceColor;
  55. 22: #endif
  56. 23: attribute vec3 position;
  57. 24: attribute vec3 normal;
  58. 25: attribute vec2 uv;
  59. 26: #ifdef USE_TANGENT
  60. 27: attribute vec4 tangent;
  61. 28: #endif
  62. 29: #ifdef USE_COLOR
  63. 30: attribute vec3 color;
  64. 31: #endif
  65. 32: #ifdef USE_MORPHTARGETS
  66. 33: attribute vec3 morphTarget0;
  67. 34: attribute vec3 morphTarget1;
  68. 35: attribute vec3 morphTarget2;
  69. 36: attribute vec3 morphTarget3;
  70. 37: #ifdef USE_MORPHNORMALS
  71. 38: attribute vec3 morphNormal0;
  72. 39: attribute vec3 morphNormal1;
  73. 40: attribute vec3 morphNormal2;
  74. 41: attribute vec3 morphNormal3;
  75. 42: #else
  76. 43: attribute vec3 morphTarget4;
  77. 44: attribute vec3 morphTarget5;
  78. 45: attribute vec3 morphTarget6;
  79. 46: attribute vec3 morphTarget7;
  80. 47: #endif
  81. 48: #endif
  82. 49: #ifdef USE_SKINNING
  83. 50: attribute vec4 skinIndex;
  84. 51: attribute vec4 skinWeight;
  85. 52: #endif
  86. 53:
  87. 54:
  88. 55: uniform sampler2D spineTexture;
  89. 56: uniform float pathOffset;
  90. 57: uniform float pathSegment;
  91. 58: uniform float spineOffset;
  92. 59: uniform float spineLength;
  93. 60: uniform int flow;
  94. 61:
  95. 62: float textureLayers = 4.;
  96. 63: float textureStacks = 1.;
  97. 64:
  98. 65: #define STANDARD
  99. 66: varying vec3 vViewPosition;
  100. 67: #ifndef FLAT_SHADED
  101. 68: varying vec3 vNormal;
  102. 69: #ifdef USE_TANGENT
  103. 70: varying vec3 vTangent;
  104. 71: varying vec3 vBitangent;
  105. 72: #endif
  106. 73: #endif
  107. 74: #define PI 3.141592653589793
  108. 75: #define PI2 6.283185307179586
  109. 76: #define PI_HALF 1.5707963267948966
  110. 77: #define RECIPROCAL_PI 0.3183098861837907
  111. 78: #define RECIPROCAL_PI2 0.15915494309189535
  112. 79: #define EPSILON 1e-6
  113. 80: #ifndef saturate
  114. 81: #define saturate(a) clamp( a, 0.0, 1.0 )
  115. 82: #endif
  116. 83: #define whiteComplement(a) ( 1.0 - saturate( a ) )
  117. 84: float pow2( const in float x ) { return x*x; }
  118. 85: float pow3( const in float x ) { return x*x*x; }
  119. 86: float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
  120. 87: float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }
  121. 88: highp float rand( const in vec2 uv ) {
  122. 89: const highp float a = 12.9898, b = 78.233, c = 43758.5453;
  123. 90: highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
  124. 91: return fract(sin(sn) * c);
  125. 92: }
  126. 93: #ifdef HIGH_PRECISION
  127. 94: float precisionSafeLength( vec3 v ) { return length( v ); }
  128. 95: #else
  129. 96: float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }
  130. 97: float precisionSafeLength( vec3 v ) {
  131. 98: float maxComponent = max3( abs( v ) );
  132. 99: return length( v / maxComponent ) * maxComponent;
  133. 100: }
  134. 101: #endif
  135. 102: struct IncidentLight {
  136. 103: vec3 color;
  137. 104: vec3 direction;
  138. 105: bool visible;
  139. 106: };
  140. 107: struct ReflectedLight {
  141. 108: vec3 directDiffuse;
  142. 109: vec3 directSpecular;
  143. 110: vec3 indirectDiffuse;
  144. 111: vec3 indirectSpecular;
  145. 112: };
  146. 113: struct GeometricContext {
  147. 114: vec3 position;
  148. 115: vec3 normal;
  149. 116: vec3 viewDir;
  150. 117: #ifdef CLEARCOAT
  151. 118: vec3 clearcoatNormal;
  152. 119: #endif
  153. 120: };
  154. 121: vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
  155. 122: return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
  156. 123: }
  157. 124: vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
  158. 125: return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
  159. 126: }
  160. 127: vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
  161. 128: float distance = dot( planeNormal, point - pointOnPlane );
  162. 129: return - distance * planeNormal + point;
  163. 130: }
  164. 131: float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
  165. 132: return sign( dot( point - pointOnPlane, planeNormal ) );
  166. 133: }
  167. 134: vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {
  168. 135: return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;
  169. 136: }
  170. 137: mat3 transposeMat3( const in mat3 m ) {
  171. 138: mat3 tmp;
  172. 139: tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
  173. 140: tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
  174. 141: tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
  175. 142: return tmp;
  176. 143: }
  177. 144: float linearToRelativeLuminance( const in vec3 color ) {
  178. 145: vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );
  179. 146: return dot( weights, color.rgb );
  180. 147: }
  181. 148: bool isPerspectiveMatrix( mat4 m ) {
  182. 149: return m[ 2 ][ 3 ] == - 1.0;
  183. 150: }
  184. 151: vec2 equirectUv( in vec3 dir ) {
  185. 152: float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
  186. 153: float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
  187. 154: return vec2( u, v );
  188. 155: }
  189. 156: #ifdef USE_UV
  190. 157: #ifdef UVS_VERTEX_ONLY
  191. 158: vec2 vUv;
  192. 159: #else
  193. 160: varying vec2 vUv;
  194. 161: #endif
  195. 162: uniform mat3 uvTransform;
  196. 163: #endif
  197. 164: #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
  198. 165: attribute vec2 uv2;
  199. 166: varying vec2 vUv2;
  200. 167: uniform mat3 uv2Transform;
  201. 168: #endif
  202. 169: #ifdef USE_DISPLACEMENTMAP
  203. 170: uniform sampler2D displacementMap;
  204. 171: uniform float displacementScale;
  205. 172: uniform float displacementBias;
  206. 173: #endif
  207. 174: #if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
  208. 175: varying vec3 vColor;
  209. 176: #endif
  210. 177: #ifdef USE_FOG
  211. 178: varying float fogDepth;
  212. 179: #endif
  213. 180: #ifdef USE_MORPHTARGETS
  214. 181: uniform float morphTargetBaseInfluence;
  215. 182: #ifndef USE_MORPHNORMALS
  216. 183: uniform float morphTargetInfluences[ 8 ];
  217. 184: #else
  218. 185: uniform float morphTargetInfluences[ 4 ];
  219. 186: #endif
  220. 187: #endif
  221. 188: #ifdef USE_SKINNING
  222. 189: uniform mat4 bindMatrix;
  223. 190: uniform mat4 bindMatrixInverse;
  224. 191: #ifdef BONE_TEXTURE
  225. 192: uniform highp sampler2D boneTexture;
  226. 193: uniform int boneTextureSize;
  227. 194: mat4 getBoneMatrix( const in float i ) {
  228. 195: float j = i * 4.0;
  229. 196: float x = mod( j, float( boneTextureSize ) );
  230. 197: float y = floor( j / float( boneTextureSize ) );
  231. 198: float dx = 1.0 / float( boneTextureSize );
  232. 199: float dy = 1.0 / float( boneTextureSize );
  233. 200: y = dy * ( y + 0.5 );
  234. 201: vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );
  235. 202: vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );
  236. 203: vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );
  237. 204: vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );
  238. 205: mat4 bone = mat4( v1, v2, v3, v4 );
  239. 206: return bone;
  240. 207: }
  241. 208: #else
  242. 209: uniform mat4 boneMatrices[ MAX_BONES ];
  243. 210: mat4 getBoneMatrix( const in float i ) {
  244. 211: mat4 bone = boneMatrices[ int(i) ];
  245. 212: return bone;
  246. 213: }
  247. 214: #endif
  248. 215: #endif
  249. 216: #ifdef USE_SHADOWMAP
  250. 217: #if 0 > 0
  251. 218: uniform mat4 directionalShadowMatrix[ 0 ];
  252. 219: varying vec4 vDirectionalShadowCoord[ 0 ];
  253. 220: struct DirectionalLightShadow {
  254. 221: float shadowBias;
  255. 222: float shadowNormalBias;
  256. 223: float shadowRadius;
  257. 224: vec2 shadowMapSize;
  258. 225: };
  259. 226: uniform DirectionalLightShadow directionalLightShadows[ 0 ];
  260. 227: #endif
  261. 228: #if 0 > 0
  262. 229: uniform mat4 spotShadowMatrix[ 0 ];
  263. 230: varying vec4 vSpotShadowCoord[ 0 ];
  264. 231: struct SpotLightShadow {
  265. 232: float shadowBias;
  266. 233: float shadowNormalBias;
  267. 234: float shadowRadius;
  268. 235: vec2 shadowMapSize;
  269. 236: };
  270. 237: uniform SpotLightShadow spotLightShadows[ 0 ];
  271. 238: #endif
  272. 239: #if 0 > 0
  273. 240: uniform mat4 pointShadowMatrix[ 0 ];
  274. 241: varying vec4 vPointShadowCoord[ 0 ];
  275. 242: struct PointLightShadow {
  276. 243: float shadowBias;
  277. 244: float shadowNormalBias;
  278. 245: float shadowRadius;
  279. 246: vec2 shadowMapSize;
  280. 247: float shadowCameraNear;
  281. 248: float shadowCameraFar;
  282. 249: };
  283. 250: uniform PointLightShadow pointLightShadows[ 0 ];
  284. 251: #endif
  285. 252: #endif
  286. 253: #ifdef USE_LOGDEPTHBUF
  287. 254: #ifdef USE_LOGDEPTHBUF_EXT
  288. 255: varying float vFragDepth;
  289. 256: varying float vIsPerspective;
  290. 257: #else
  291. 258: uniform float logDepthBufFC;
  292. 259: #endif
  293. 260: #endif
  294. 261: #if 0 > 0
  295. 262: varying vec3 vClipPosition;
  296. 263: #endif
  297. 264:
  298. 265: void main() {
  299. 266: vec3 objectNormal = vec3( normal );
  300. 267: #ifdef USE_TANGENT
  301. 268: vec3 objectTangent = vec3( tangent.xyz );
  302. 269: #endif
  303. 270:
  304. 271: vec4 worldPos = modelMatrix * vec4(position, 1.);
  305. 272:
  306. 273: bool bend = flow > 0;
  307. 274: float xWeight = bend ? 0. : 1.;
  308. 275:
  309. 276: #ifdef USE_INSTANCING
  310. 277: float pathOffsetFromInstanceMatrix = instanceMatrix[3][2];
  311. 278: float spineLengthFromInstanceMatrix = instanceMatrix[3][0];
  312. 279: float spinePortion = bend ? (worldPos.x + spineOffset) / spineLengthFromInstanceMatrix : 0.;
  313. 280: float mt = (spinePortion * pathSegment + pathOffset + pathOffsetFromInstanceMatrix)*textureStacks;
  314. 281: #else
  315. 282: float spinePortion = bend ? (worldPos.x + spineOffset) / spineLength : 0.;
  316. 283: float mt = (spinePortion * pathSegment + pathOffset)*textureStacks;
  317. 284: #endif
  318. 285:
  319. 286: mt = mod(mt, textureStacks);
  320. 287: float rowOffset = floor(mt);
  321. 288:
  322. 289: #ifdef USE_INSTANCING
  323. 290: rowOffset += instanceMatrix[3][1] * 4.;
  324. 291: #endif
  325. 292:
  326. 293: vec3 spinePos = texture(spineTexture, vec2(mt, (0. + rowOffset + 0.5) / textureLayers)).xyz;
  327. 294: vec3 a = texture(spineTexture, vec2(mt, (1. + rowOffset + 0.5) / textureLayers)).xyz;
  328. 295: vec3 b = texture(spineTexture, vec2(mt, (2. + rowOffset + 0.5) / textureLayers)).xyz;
  329. 296: vec3 c = texture(spineTexture, vec2(mt, (3. + rowOffset + 0.5) / textureLayers)).xyz;
  330. 297: mat3 basis = mat3(a, b, c);
  331. 298:
  332. 299: vec3 transformed = basis
  333. 300: * vec3(worldPos.x * xWeight, worldPos.y * 1., worldPos.z * 1.)
  334. 301: + spinePos;
  335. 302:
  336. 303: vec3 transformedNormal = normalMatrix * (basis * objectNormal);
  337. 304:
  338. 305: #ifdef USE_UV
  339. 306: vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
  340. 307: #endif
  341. 308: #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
  342. 309: vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;
  343. 310: #endif
  344. 311: #if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
  345. 312: vColor = vec3( 1.0 );
  346. 313: #endif
  347. 314: #ifdef USE_COLOR
  348. 315: vColor.xyz *= color.xyz;
  349. 316: #endif
  350. 317: #ifdef USE_INSTANCING_COLOR
  351. 318: vColor.xyz *= instanceColor.xyz;
  352. 319: #endif
  353. 320:
  354. 321: #ifdef USE_MORPHNORMALS
  355. 322: objectNormal *= morphTargetBaseInfluence;
  356. 323: objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
  357. 324: objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
  358. 325: objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
  359. 326: objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
  360. 327: #endif
  361. 328: #ifdef USE_SKINNING
  362. 329: mat4 boneMatX = getBoneMatrix( skinIndex.x );
  363. 330: mat4 boneMatY = getBoneMatrix( skinIndex.y );
  364. 331: mat4 boneMatZ = getBoneMatrix( skinIndex.z );
  365. 332: mat4 boneMatW = getBoneMatrix( skinIndex.w );
  366. 333: #endif
  367. 334: #ifdef USE_SKINNING
  368. 335: mat4 skinMatrix = mat4( 0.0 );
  369. 336: skinMatrix += skinWeight.x * boneMatX;
  370. 337: skinMatrix += skinWeight.y * boneMatY;
  371. 338: skinMatrix += skinWeight.z * boneMatZ;
  372. 339: skinMatrix += skinWeight.w * boneMatW;
  373. 340: skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
  374. 341: objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
  375. 342: #ifdef USE_TANGENT
  376. 343: objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
  377. 344: #endif
  378. 345: #endif
  379. 346:
  380. 347: #ifndef FLAT_SHADED
  381. 348: vNormal = normalize( transformedNormal );
  382. 349: #ifdef USE_TANGENT
  383. 350: vTangent = normalize( transformedTangent );
  384. 351: vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
  385. 352: #endif
  386. 353: #endif
  387. 354:
  388. 355: #ifdef USE_MORPHTARGETS
  389. 356: transformed *= morphTargetBaseInfluence;
  390. 357: transformed += morphTarget0 * morphTargetInfluences[ 0 ];
  391. 358: transformed += morphTarget1 * morphTargetInfluences[ 1 ];
  392. 359: transformed += morphTarget2 * morphTargetInfluences[ 2 ];
  393. 360: transformed += morphTarget3 * morphTargetInfluences[ 3 ];
  394. 361: #ifndef USE_MORPHNORMALS
  395. 362: transformed += morphTarget4 * morphTargetInfluences[ 4 ];
  396. 363: transformed += morphTarget5 * morphTargetInfluences[ 5 ];
  397. 364: transformed += morphTarget6 * morphTargetInfluences[ 6 ];
  398. 365: transformed += morphTarget7 * morphTargetInfluences[ 7 ];
  399. 366: #endif
  400. 367: #endif
  401. 368: #ifdef USE_SKINNING
  402. 369: vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
  403. 370: vec4 skinned = vec4( 0.0 );
  404. 371: skinned += boneMatX * skinVertex * skinWeight.x;
  405. 372: skinned += boneMatY * skinVertex * skinWeight.y;
  406. 373: skinned += boneMatZ * skinVertex * skinWeight.z;
  407. 374: skinned += boneMatW * skinVertex * skinWeight.w;
  408. 375: transformed = ( bindMatrixInverse * skinned ).xyz;
  409. 376: #endif
  410. 377: #ifdef USE_DISPLACEMENTMAP
  411. 378: transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );
  412. 379: #endif
  413. 380:
  414. 381: vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );
  415. 382: gl_Position = projectionMatrix * mvPosition;
  416. 383:
  417. 384: #ifdef USE_LOGDEPTHBUF
  418. 385: #ifdef USE_LOGDEPTHBUF_EXT
  419. 386: vFragDepth = 1.0 + gl_Position.w;
  420. 387: vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
  421. 388: #else
  422. 389: if ( isPerspectiveMatrix( projectionMatrix ) ) {
  423. 390: gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
  424. 391: gl_Position.z *= gl_Position.w;
  425. 392: }
  426. 393: #endif
  427. 394: #endif
  428. 395: #if 0 > 0
  429. 396: vClipPosition = - mvPosition.xyz;
  430. 397: #endif
  431. 398: vViewPosition = - mvPosition.xyz;
  432. 399: #if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )
  433. 400: vec4 worldPosition = vec4( transformed, 1.0 );
  434. 401: #ifdef USE_INSTANCING
  435. 402: worldPosition = instanceMatrix * worldPosition;
  436. 403: #endif
  437. 404: worldPosition = modelMatrix * worldPosition;
  438. 405: #endif
  439. 406: #ifdef USE_SHADOWMAP
  440. 407: #if 0 > 0 || 0 > 0 || 0 > 0
  441. 408: vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
  442. 409: vec4 shadowWorldPosition;
  443. 410: #endif
  444. 411: #if 0 > 0
  445. 412:
  446. 413: #endif
  447. 414: #if 0 > 0
  448. 415:
  449. 416: #endif
  450. 417: #if 0 > 0
  451. 418:
  452. 419: #endif
  453. 420: #endif
  454. 421: #ifdef USE_FOG
  455. 422: fogDepth = - mvPosition.z;
  456. 423: #endif
  457. 424: }
  458. 425: WebGLProgram @ three.module.js:17432acquireProgram @ three.module.js:17900initMaterial @ three.module.js:24548setProgram @ three.module.js:24674renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
  459. 256[native code]:1 WebGL: INVALID_OPERATION: useProgram: program not validuseProgram @ [native code]:1useProgram @ three.module.js:19795setProgram @ three.module.js:24687renderBufferDirect @ three.module.js:23933renderObject @ three.module.js:24486renderObjects @ three.module.js:24458render @ three.module.js:24258render @ VM42 webgl_modifier_curve.html:209animate @ VM42 webgl_modifier_curve.html:203
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement