Advertisement
Guest User

Untitled

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