DiffuseVertShader.cpp 5.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // This file was created by Filewrap 1.1
  2. // Little endian mode
  3. // DO NOT EDIT
  4. #include "../PVRTMemoryFileSystem.h"
  5. // using 32 bit to guarantee alignment.
  6. #ifndef A32BIT
  7. #define A32BIT static const unsigned int
  8. #endif
  9. // ******** Start: DiffuseVertShader.vsh ********
  10. // File data
  11. static const char _DiffuseVertShader_vsh[] =
  12. "attribute highp vec3 inVertex;\r\n"
  13. "attribute mediump vec3 inNormal;\r\n"
  14. "attribute mediump vec2 inTexCoord;\r\n"
  15. "\r\n"
  16. "uniform highp mat4 MVPMatrix;\r\n"
  17. "uniform highp mat3 Model;\r\n"
  18. "\r\n"
  19. "// Precalculated constants used for lighting\r\n"
  20. "uniform mediump vec3 LightDir1;\r\n"
  21. "uniform mediump vec3 LightDir2;\r\n"
  22. "uniform mediump vec3 LightDir3;\r\n"
  23. "uniform mediump vec3 LightDir4;\r\n"
  24. "uniform mediump vec4 Ambient;\r\n"
  25. "\r\n"
  26. "// varyings\r\n"
  27. "varying lowp vec4 LightColour;\r\n"
  28. "varying mediump vec2 TexCoord;\r\n"
  29. "\r\n"
  30. "void main()\r\n"
  31. "{\r\n"
  32. "\thighp vec4 r1;\r\n"
  33. "\thighp vec3 norm, r2, r3;\r\n"
  34. "\t\r\n"
  35. "\t// Transform position\r\n"
  36. "\tgl_Position = MVPMatrix * vec4(inVertex, 1.0);\r\n"
  37. "\r\n"
  38. "\t// Transform the Normal\r\n"
  39. "\tnorm = normalize(Model * inNormal);\r\n"
  40. "\r\n"
  41. "\t// compute lighting\r\n"
  42. "\tr1.x =\tmax(0.0, dot(norm, LightDir1));\t// White Light\r\n"
  43. "\tr1.y =\tmax(0.0, dot(norm, LightDir2));\t// Blue Light\r\n"
  44. "\tr1.z =\tmax(0.0, dot(norm, LightDir3));\t// Green Light\r\n"
  45. "\tr1.w =\tmax(0.0, dot(norm, LightDir4));\t// Red Light\r\n"
  46. "\r\n"
  47. "\tLightColour.r = (r1.x + r1.w) + Ambient.r; // White Light (BGRA)\r\n"
  48. "\tLightColour.g = (r1.x + r1.z) + Ambient.g; // Red Light (BGRA)\r\n"
  49. "\tLightColour.b = (r1.x + r1.y) + Ambient.b; // Green Light (BGRA)\r\n"
  50. "\tLightColour.a = r1.x + Ambient.a; // Blue Light (BGRA)\r\n"
  51. "\r\n"
  52. "\t// Pass through texcoords\r\n"
  53. "\tTexCoord = inTexCoord;\r\n"
  54. "}";
  55. // Register DiffuseVertShader.vsh in memory file system at application startup time
  56. static CPVRTMemoryFileSystem RegisterFile_DiffuseVertShader_vsh("DiffuseVertShader.vsh", _DiffuseVertShader_vsh, 1246);
  57. // ******** End: DiffuseVertShader.vsh ********
  58. // This file was created by Filewrap 1.1
  59. // Little endian mode
  60. // DO NOT EDIT
  61. #include "../PVRTMemoryFileSystem.h"
  62. // using 32 bit to guarantee alignment.
  63. #ifndef A32BIT
  64. #define A32BIT static const unsigned int
  65. #endif
  66. // ******** Start: DiffuseVertShader.vsc ********
  67. // File data
  68. A32BIT _DiffuseVertShader_vsc[] = {
  69. 0x10fab438,0xab151590,0x30050100,0x2501,0xd363e337,0x2000000,0x20000000,0xa060000,0x0,0x4000000,0x0,0x19000000,0x204,0x0,0x2010000,0x0,0x0,0xa6030000,0x55535020,0x20,0x39a,0x1,0x1,0x0,0x204,0x80,0x2,0x7d,0x0,0x8,0x0,0xffffffff,0x0,0x122000a,0xffff,0xa,0x0,0x0,0x2e,0x0,0x0,0x0,0x0,0xfffc,0x0,0x0,0x0,0xffff0003,0xffffffff,0x240000,0x80000a,0x200002,0x0,0x210002,0x100000,0x240002,0x1,0x250002,0x100001,0x220002,0x2,0x230002,0x100002,0x260002,
  70. 0x3,0x270002,0x100003,0x280002,0x4,0x290002,0x100004,0x2c0002,0x5,0x2d0002,0x100005,0x2a0002,0x6,0x2b0002,0x100006,0x2e0002,0x7,0x2f0002,0x100007,0x300002,0x8,0x310002,0x100008,0x320002,0x9,0x330002,0x100009,0x60001,0xa,0x70001,0xb,0xa0001,0xc,0xb0001,0xd,0xe0001,0xe,0xf0001,0xf,0x140001,0x10,0x150001,0x11,0x180001,0x12,0x190001,0x13,0x1c0001,0x14,0x1d0001,0x15,0x5,0x160000,0x10000,0x170004,0x10000,0x180005,0x10000,0x190008,0x10000,0x1a0009,0x10000,0x1b000c,0x10000,
  71. 0x1c000d,0x10000,0x1d0010,0x10000,0x1e0011,0x10000,0x1f0012,0x10000,0x200013,0x10000,0x210016,0x10000,0x22001a,0x10000,0x23001e,0x3770000,0xffff0000,0xffffffff,0xffff,0x0,0x40000,0x30000,0x2,0x30013,0x80018001,0x80018001,0x0,0x0,0x4,0x0,0x10001,0x1,0x10001,0x10001,0x10001,0x10001,0x10001,0x1010001,0x0,0x1584fd10,0x2002e0a0,0x40010a0,0x1001a100,0xa1528a1,0x606f060,0x4b1738ab,0x606f060,0x8c193882,0x606f060,0x1a293882,0x1001705f,0xd1b00a2,0x606f061,0x4e1d38ab,0x606f061,0x8f1f3882,0x606f061,0x813882,0x1402f07f,0xc3830083,0x1006a061,0x1800080,0x12028060,0xc1b00880,
  72. 0x100690c1,0xc1a00081,0xc206b080,0x10a238a9,0x606f0a0,0x51a43898,0x606f000,0x92a63882,0x606f000,0x1a273882,0x1001701f,0x200a2,0x90000,0x80ff0003,0x80008001,0x8001,0x0,0x40000,0x10000,0x10001,0x10000,0x10001,0xff010001,0xfa100000,0xf0012a56,0x38ab0606,0xf0016ad7,0x38820606,0xf001ac5a,0x38820606,0x70601800,0x18a31202,0xf0012e5e,0x38ab0606,0xf0016edf,0x38820606,0xf001b062,0x38820606,0x70201800,0x18a31202,0x2,0x30005,0x80018001,0x80018000,0x0,0x0,0x4,0x1,0x10001,0x101,0xc001fa10,0x606a000,0x1a6438a3,0x1001708f,0xc16700e2,0x405b0e0,0x1a6638b3,0x100170cf,0x600c2,0x34000000,0x803f,0x0,0x0,0x0,
  73. 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6e690d00,0x74726556,0x7865,0x3040400,0x10000,0x100,0x70004,0x5f6c6700,0x69736f50,0x6e6f6974,0x5010000,0x305,0x1000001,0x40000,0x4d00000f,0x614d5056,
  74. 0x78697274,0x16000000,0x303,0x1000001,0xff100400,0x690000ff,0x726f4e6e,0x6c616d,0x4040000,0x1000002,0x10000,0x7000404,0x6f4d0000,0x6c6564,0x3120000,0x1000003,0x10000,0x77070c14,0x694c0000,0x44746867,0x317269,0x3040000,0x1000002,0x10000,0x7000320,0x694c0000,0x44746867,0x327269,0x3040000,0x1000002,0x10000,0x7000324,0x694c0000,0x44746867,0x337269,0x3040000,0x1000002,0x10000,0x7000328,0x694c0000,0x44746867,0x347269,0x3040000,0x1000002,0x10000,0x700032c,0x6d410000,0x6e656962,0x74,0x20305,0x100,0x4300001,0xf00,0x6867694c,0x6c6f4374,0x72756f,0x5050000,0x1000001,0x10000,0xf000400,0x65540000,0x6f6f4378,0x6472,0x2050300,
  75. 0x10000,0x4000100,0x30002,0x546e6900,0x6f437865,0x64726f,0x4030000,0x1000002,0x10000,0x3000408,0x0,
  76. };
  77. // Register DiffuseVertShader.vsc in memory file system at application startup time
  78. static CPVRTMemoryFileSystem RegisterFile_DiffuseVertShader_vsc("DiffuseVertShader.vsc", _DiffuseVertShader_vsc, 1578);
  79. // ******** End: DiffuseVertShader.vsc ********