Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Failed to compile vertex shader:
- 1: #version 300 es
- 2:
- 3: #define attribute in
- 4: #define varying out
- 5: #define texture2D texture
- 6: #define utexture2D texture
- 7: #define itexture2D texture
- 8: #define GL2
- 9: #define VERTEXSHADER
- 10: #define TEXTURE_PASS(name) name
- 11: #define TEXTURE_ACCEPT(name) sampler2D name
- 12: #define TEXTURE_ACCEPT_HIGHP(name) highp sampler2D name
- 13:
- 14: vec2 getGrabScreenPos(vec4 clipPos) {
- 15: vec2 uv = (clipPos.xy / clipPos.w) * 0.5 + 0.5;
- 16: return uv;
- 17: }
- 18: vec2 getImageEffectUV(vec2 uv) {
- 19: return uv;
- 20: }
- 21: #define SHADER_NAME LitShader
- 22: #define FORWARD_PASS
- 23: #define FORWARD_PASS
- 24: varying vec4 vVertexColor;
- 25: varying vec3 vPositionW;
- 26: varying vec2 vUv0;
- 27:
- 28: attribute vec3 vertex_position;
- 29: attribute vec3 vertex_normal;
- 30: attribute vec4 vertex_tangent;
- 31: attribute vec2 vertex_texCoord0;
- 32: attribute vec2 vertex_texCoord1;
- 33: attribute vec4 vertex_color;
- 34: uniform mat4 matrix_viewProjection;
- 35: uniform mat4 matrix_model;
- 36: uniform mat3 matrix_normal;
- 37: vec3 dPositionW;
- 38: mat4 dModelMatrix;
- 39: mat3 dNormalMatrix;
- 40:
- 41: vec2 getUv0() {
- 42: return vertex_texCoord0;
- 43: }
- 44:
- 45: mat4 getModelMatrix() {
- 46: return matrix_model;
- 47: }
- 48: vec4 getPosition() {
- 49: dModelMatrix = getModelMatrix();
- 50: vec3 localPos = vertex_position;
- 51: vec4 posW = dModelMatrix * vec4(localPos, 1.0);
- 52: dPositionW = posW.xyz;
- 53: vec4 screenPos;
- 54: screenPos = matrix_viewProjection * posW;
- 55: return screenPos;
- 56: }
- 57: vec3 getWorldPosition() {
- 58: return dPositionW;
- 59: }
- 60:
- 61:
- 62: void main(void) {
- 63: gl_Position = getPosition();
- 64: vPositionW = getWorldPosition();
- 65: vec2 uv0 = getUv0();
- 66: vUv0 = uv0;
- 67: vVertexColor = vertex_color;
- 68:
- 69: }
- while rendering undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement