Hi guys. I’m working on some game where when I move the mouse above cubes, they change color. Everything works fine, but when I make move long enough this error shows up and I’m stuck with it.
I need to continue and I’m really stuck in here
ERROR: FRAMEBUFFER_UNSUPPORTED
ERROR: FRAMEBUFFER_UNSUPPORTED
Failed to compile vertex shader:
1: #version 300 es
2:
3:
4: #define attribute in
5: #define varying out
6: #define texture2D texture
7: #define GL2
8: #define VERTEXSHADER
9: varying vec3 vPositionW;
10: attribute vec3 vertex_position;
11: attribute vec3 vertex_normal;
12: attribute vec4 vertex_tangent;
13: attribute vec2 vertex_texCoord0;
14: attribute vec2 vertex_texCoord1;
15: attribute vec4 vertex_color;
16:
17: uniform mat4 matrix_viewProjection;
18: uniform mat4 matrix_model;
19: uniform mat3 matrix_normal;
20:
21: vec3 dPositionW;
22: mat4 dModelMatrix;
23: mat3 dNormalMatrix;
24: #ifdef PIXELSNAP
25: uniform vec4 uScreenSize;
26: #endif
27:
28: #ifdef MORPHING
29: uniform vec4 morph_weights_a;
30: uniform vec4 morph_weights_b;
31: #endif
32:
33: #ifdef MORPHING_TEXTURE_BASED
34: uniform vec4 morph_tex_params;
35:
36: vec2 getTextureMorphCoords() {
37: float vertexId = morph_vertex_id;
38: vec2 textureSize = morph_tex_params.xy;
39: vec2 invTextureSize = morph_tex_params.zw;
40:
41: // turn vertexId into int grid coordinates
42: float morphGridV = floor(vertexId * invTextureSize.x);
43: float morphGridU = vertexId - (morphGridV * textureSize.x);
44:
45: // convert grid coordinates to uv coordinates with half pixel offset
46: return (vec2(morphGridU, morphGridV) * invTextureSize) + (0.5 * invTextureSize);
47: }
48: #endif
49:
50: #ifdef MORPHING_TEXTURE_BASED_POSITION
51: uniform highp sampler2D morphPositionTex;
52: #endif
53:
54: mat4 getModelMatrix() {
55: #ifdef DYNAMICBATCH
56: return getBoneMatrix(vertex_boneIndices);
57: #elif defined(SKIN)
58: return matrix_model * getSkinMatrix(vertex_boneIndices, vertex_boneWeights);
59: #elif defined(INSTANCING)
60: return mat4(instance_line1, instance_line2, instance_line3, instance_line4);
61: #else
62: return matrix_model;
63: #endif
64: }
65:
66: vec4 getPosition() {
67: dModelMatrix = getModelMatrix();
68: vec3 localPos = vertex_position;
69:
70: #ifdef NINESLICED
71: // outer and inner vertices are at the same position, scale both
72: localPos.xz *= outerScale;
73:
74: // offset inner vertices inside
75: // (original vertices must be in [-1;1] range)
76: vec2 positiveUnitOffset = clamp(vertex_position.xz, vec2(0.0), vec2(1.0));
77: vec2 negativeUnitOffset = clamp(-vertex_position.xz, vec2(0.0), vec2(1.0));
78: localPos.xz += (-positiveUnitOffset * innerOffset.xy + negativeUnitOffset * innerOffset.zw) * vertex_texCoord0.xy;
79:
80: vTiledUv = (localPos.xz - outerScale + innerOffset.xy) * -0.5 + 1.0; // uv = local pos - inner corner
81:
82: localPos.xz *= -0.5; // move from -1;1 to -0.5;0.5
83: localPos = localPos.xzy;
84: #endif
85:
86: #ifdef MORPHING
87: #ifdef MORPHING_POS03
88: localPos.xyz += morph_weights_a[0] * morph_pos0;
89: localPos.xyz += morph_weights_a[1] * morph_pos1;
90: localPos.xyz += morph_weights_a[2] * morph_pos2;
91: localPos.xyz += morph_weights_a[3] * morph_pos3;
92: #endif // MORPHING_POS03
93: #ifdef MORPHING_POS47
94: localPos.xyz += morph_weights_b[0] * morph_pos4;
95: localPos.xyz += morph_weights_b[1] * morph_pos5;
96: localPos.xyz += morph_weights_b[2] * morph_pos6;
97: localPos.xyz += morph_weights_b[3] * morph_pos7;
98: #endif // MORPHING_POS47
99: #endif // MORPHING
100:
101: #ifdef MORPHING_TEXTURE_BASED_POSITION
102: // apply morph offset from texture
103: vec2 morphUV = getTextureMorphCoords();
104: vec3 morphPos = texture2D(morphPositionTex, morphUV).xyz;
105: localPos += morphPos;
106: #endif
107:
108: vec4 posW = dModelMatrix * vec4(localPos, 1.0);
109: #ifdef SCREENSPACE
110: posW.zw = vec2(0.0, 1.0);
111: #endif
112: dPositionW = posW.xyz;
113:
114: vec4 screenPos;
115: #ifdef UV1LAYOUT
116: screenPos = vec4(vertex_texCoord1.xy * 2.0 - 1.0, 0.5, 1);
117: #else
118: #ifdef SCREENSPACE
119: screenPos = posW;
120: #else
121: screenPos = matrix_viewProjection * posW;
122: #endif
123:
124: #ifdef PIXELSNAP
125: // snap vertex to a pixel boundary
126: screenPos.xy = (screenPos.xy * 0.5) + 0.5;
127: screenPos.xy *= uScreenSize.xy;
128: screenPos.xy = floor(screenPos.xy);
129: screenPos.xy *= uScreenSize.zw;
130: screenPos.xy = (screenPos.xy * 2.0) - 1.0;
131: #endif
132: #endif
133:
134: return screenPos;
135: }
136:
137: vec3 getWorldPosition() {
138: return dPositionW;
139: }
140:
141: void main(void) {
142: gl_Position = getPosition();
143: vPositionW = getWorldPosition();
144:
145: }
null
Error in material "BackgroundMaterial" with flags 65549
Failed to compile vertex shader:
1: attribute vec3 aPosition;
2:
3: #ifndef VIEWMATRIX
4: #define VIEWMATRIX
5: uniform mat4 matrix_view;
6: #endif
7:
8: uniform mat4 matrix_projectionSkybox;
9:
10: varying vec3 vViewDir;
11:
12: void main(void) {
13: mat4 view = matrix_view;
14: view[3][0] = view[3][1] = view[3][2] = 0.0;
15: gl_Position = matrix_projectionSkybox * view * vec4(aPosition, 1.0);
16:
17: // Force skybox to far Z, regardless of the clip planes on the camera
18: // Subtract a tiny fudge factor to ensure floating point errors don't
19: // still push pixels beyond far Z. See:
20: // http://www.opengl.org/discussion_boards/showthread.php/171867-skybox-problem
21:
22: gl_Position.z = gl_Position.w - 0.00001;
23: vViewDir = aPosition;
24: }
25:
null
Error in material "Untitled" with flags 65548
Failed to compile vertex shader:
1: #version 300 es
2:
3:
4: #define attribute in
5: #define varying out
6: #define texture2D texture
7: #define GL2
8: #define VERTEXSHADER
9: varying vec3 vPositionW;
10: varying vec2 vUv0;
11: attribute vec3 vertex_position;
12: attribute vec3 vertex_normal;
13: attribute vec4 vertex_tangent;
14: attribute vec2 vertex_texCoord0;
15: attribute vec2 vertex_texCoord1;
16: attribute vec4 vertex_color;
17:
18: uniform mat4 matrix_viewProjection;
19: uniform mat4 matrix_model;
20: uniform mat3 matrix_normal;
21:
22: vec3 dPositionW;
23: mat4 dModelMatrix;
24: mat3 dNormalMatrix;
25: #ifdef NINESLICED
26: vec2 getUv0() {
27: vec2 uv = vertex_position.xz;
28:
29: // offset inner vertices inside
30: // (original vertices must be in [-1;1] range)
31: vec2 positiveUnitOffset = clamp(vertex_position.xz, vec2(0.0), vec2(1.0));
32: vec2 negativeUnitOffset = clamp(-vertex_position.xz, vec2(0.0), vec2(1.0));
33: uv += (-positiveUnitOffset * innerOffset.xy + negativeUnitOffset * innerOffset.zw) * vertex_texCoord0.xy;
34:
35: uv = uv * -0.5 + 0.5;
36: uv = uv * atlasRect.zw + atlasRect.xy;
37:
38: vMask = vertex_texCoord0.xy;
39:
40: return uv;
41: }
42: #else
43: vec2 getUv0() {
44: return vertex_texCoord0;
45: }
46: #endif
47: #define SCREENSPACE
48: #ifdef PIXELSNAP
49: uniform vec4 uScreenSize;
50: #endif
51:
52: #ifdef MORPHING
53: uniform vec4 morph_weights_a;
54: uniform vec4 morph_weights_b;
55: #endif
56:
57: #ifdef MORPHING_TEXTURE_BASED
58: uniform vec4 morph_tex_params;
59:
60: vec2 getTextureMorphCoords() {
61: float vertexId = morph_vertex_id;
62: vec2 textureSize = morph_tex_params.xy;
63: vec2 invTextureSize = morph_tex_params.zw;
64:
65: // turn vertexId into int grid coordinates
66: float morphGridV = floor(vertexId * invTextureSize.x);
67: float morphGridU = vertexId - (morphGridV * textureSize.x);
68:
69: // convert grid coordinates to uv coordinates with half pixel offset
70: return (vec2(morphGridU, morphGridV) * invTextureSize) + (0.5 * invTextureSize);
71: }
72: #endif
73:
74: #ifdef MORPHING_TEXTURE_BASED_POSITION
75: uniform highp sampler2D morphPositionTex;
76: #endif
77:
78: mat4 getModelMatrix() {
79: #ifdef DYNAMICBATCH
80: return getBoneMatrix(vertex_boneIndices);
81: #elif defined(SKIN)
82: return matrix_model * getSkinMatrix(vertex_boneIndices, vertex_boneWeights);
83: #elif defined(INSTANCING)
84: return mat4(instance_line1, instance_line2, instance_line3, instance_line4);
85: #else
86: return matrix_model;
87: #endif
88: }
89:
90: vec4 getPosition() {
91: dModelMatrix = getModelMatrix();
92: vec3 localPos = vertex_position;
93:
94: #ifdef NINESLICED
95: // outer and inner vertices are at the same position, scale both
96: localPos.xz *= outerScale;
97:
98: // offset inner vertices inside
99: // (original vertices must be in [-1;1] range)
100: vec2 positiveUnitOffset = clamp(vertex_position.xz, vec2(0.0), vec2(1.0));
101: vec2 negativeUnitOffset = clamp(-vertex_position.xz, vec2(0.0), vec2(1.0));
102: localPos.xz += (-positiveUnitOffset * innerOffset.xy + negativeUnitOffset * innerOffset.zw) * vertex_texCoord0.xy;
103:
104: vTiledUv = (localPos.xz - outerScale + innerOffset.xy) * -0.5 + 1.0; // uv = local pos - inner corner
105:
106: localPos.xz *= -0.5; // move from -1;1 to -0.5;0.5
107: localPos = localPos.xzy;
108: #endif
109:
110: #ifdef MORPHING
111: #ifdef MORPHING_POS03
112: localPos.xyz += morph_weights_a[0] * morph_pos0;
113: localPos.xyz += morph_weights_a[1] * morph_pos1;
114: localPos.xyz += morph_weights_a[2] * morph_pos2;
115: localPos.xyz += morph_weights_a[3] * morph_pos3;
116: #endif // MORPHING_POS03
117: #ifdef MORPHING_POS47
118: localPos.xyz += morph_weights_b[0] * morph_pos4;
119: localPos.xyz += morph_weights_b[1] * morph_pos5;
120: localPos.xyz += morph_weights_b[2] * morph_pos6;
121: localPos.xyz += morph_weights_b[3] * morph_pos7;
122: #endif // MORPHING_POS47
123: #endif // MORPHING
124:
125: #ifdef MORPHING_TEXTURE_BASED_POSITION
126: // apply morph offset from texture
127: vec2 morphUV = getTextureMorphCoords();
128: vec3 morphPos = texture2D(morphPositionTex, morphUV).xyz;
129: localPos += morphPos;
130: #endif
131:
132: vec4 posW = dModelMatrix * vec4(localPos, 1.0);
133: #ifdef SCREENSPACE
134: posW.zw = vec2(0.0, 1.0);
135: #endif
136: dPositionW = posW.xyz;
137:
138: vec4 screenPos;
139: #ifdef UV1LAYOUT
140: screenPos = vec4(vertex_texCoord1.xy * 2.0 - 1.0, 0.5, 1);
141: #else
142: #ifdef SCREENSPACE
143: screenPos = posW;
144: #else
145: screenPos = matrix_viewProjection * posW;
146: #endif
147:
148: #ifdef PIXELSNAP
149: // snap vertex to a pixel boundary
150: screenPos.xy = (screenPos.xy * 0.5) + 0.5;
151: screenPos.xy *= uScreenSize.xy;
152: screenPos.xy = floor(screenPos.xy);
153: screenPos.xy *= uScreenSize.zw;
154: screenPos.xy = (screenPos.xy * 2.0) - 1.0;
155: #endif
156: #endif
157:
158: return screenPos;
159: }
160:
161: vec3 getWorldPosition() {
162: return dPositionW;
163: }
164:
165: void main(void) {
166: gl_Position = getPosition();
167: vPositionW = getWorldPosition();
168: vec2 uv0 = getUv0();
169: vUv0 = uv0;
170:
171: }
null
Error in material "defaultScreenSpaceImageMaterial" with flags 65797
ERROR: FRAMEBUFFER_UNSUPPORTED
ERROR: FRAMEBUFFER_UNSUPPORTED
ERROR: FRAMEBUFFER_UNSUPPORTED
ERROR: FRAMEBUFFER_UNSUPPORTED
```.