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