VertShader.cpp 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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: VertShader.vsh ********
  10. // File data
  11. static const char _VertShader_vsh[] =
  12. "attribute highp vec4 inVertex;\r\n"
  13. "attribute highp vec3 inNormal;\r\n"
  14. "attribute highp vec2 inTexCoord;\r\n"
  15. "attribute highp vec3 inTangent;\r\n"
  16. "\r\n"
  17. "uniform highp mat4 MVPMatrix;\t\t// model view projection transformation\r\n"
  18. "uniform highp vec3 LightPosModel;\t// Light position (point light) in model space\r\n"
  19. "\r\n"
  20. "varying lowp vec3 LightVec;\r\n"
  21. "varying mediump vec2 TexCoord;\r\n"
  22. "\r\n"
  23. "void main()\r\n"
  24. "{\r\n"
  25. "\t// Transform position\r\n"
  26. "\tgl_Position = MVPMatrix * inVertex;\r\n"
  27. "\t\r\n"
  28. "\t// Calculate light direction from light position in model space\r\n"
  29. "\t// You can skip this step for directional lights\r\n"
  30. "\thighp vec3 lightDirection = normalize(LightPosModel - vec3(inVertex));\r\n"
  31. "\t\r\n"
  32. "\t// transform light direction from model space to tangent space\r\n"
  33. "\thighp vec3 bitangent = cross(inNormal, inTangent);\r\n"
  34. "\thighp mat3 tangentSpaceXform = mat3(inTangent, inNormal, bitangent);\r\n"
  35. "\tLightVec = lightDirection * tangentSpaceXform;\r\n"
  36. "\t\r\n"
  37. "\tTexCoord = inTexCoord;\r\n"
  38. "}\r\n";
  39. // Register VertShader.vsh in memory file system at application startup time
  40. static CPVRTMemoryFileSystem RegisterFile_VertShader_vsh("VertShader.vsh", _VertShader_vsh, 903);
  41. // ******** End: VertShader.vsh ********
  42. // This file was created by Filewrap 1.1
  43. // Little endian mode
  44. // DO NOT EDIT
  45. #include "../PVRTMemoryFileSystem.h"
  46. // using 32 bit to guarantee alignment.
  47. #ifndef A32BIT
  48. #define A32BIT static const unsigned int
  49. #endif
  50. // ******** Start: VertShader.vsc ********
  51. // File data
  52. A32BIT _VertShader_vsc[] = {
  53. 0x10fab438,0x647de8a5,0x30050100,0x2501,0xd363e337,0x2000000,0x20000000,0x15040000,0x0,0x4000000,0x0,0x19000000,0x203,0x0,0x2010000,0x0,0x0,0x9a020000,0x55535020,0x20,0x28e,0x1,0x1,0x0,0x204,0x80,0x2,0x7d,0x0,0x8,0x0,0xffffffff,0x0,0x122000a,0xffff,0x2000e,0x0,0x0,0x13,0x0,0x0,0x0,0x0,0xfffc,0x0,0x0,0x0,0xffff0003,0xffffffff,0x130000,0x80000e,0x1,0x0,0x10001,0x1,0x20001,0x2,0x30001,0x3,0x40001,0x4,0x50001,0x5,0x60001,
  54. 0x6,0x70001,0x7,0x80001,0x8,0x90001,0x9,0xa0001,0xa,0xb0001,0xb,0xc0001,0xc,0xd0001,0xd,0xe0001,0xe,0xf0001,0xf,0x100001,0x10,0x110001,0x11,0x120001,0x12,0x377f,0xffffffff,0xffffffff,0x0,0x0,0x4,0x20003,0x80000,0x80010002,0x80018001,0x8001,0x0,0x0,0x0,0x0,0x0,0x1a1a0000,0x10847020,0x5a1b0082,0x10857060,0x9a1c0082,0x10867160,0x41830082,0x140250e0,0xc5870080,0x1006a0e2,0x3800080,0x12008000,0xc0300880,0x100610e2,0x6000081,0x1001a0e0,0x228a1,0x20000,0x80000002,0x80048001,0x8004,0x0,0x40000,
  55. 0x4040000,0x1,0x50bfa10,0x3205f000,0x210a8,0x120000,0x80000002,0x80ff8001,0x8001,0x0,0x50000,0x10001,0x10001,0x10001,0x10001,0x1,0x10000,0x10001,0x0,0xff010000,0x1,0x60dfa10,0x605f020,0x48113898,0x606f000,0x8a153882,0x606f000,0xcc193882,0x205f040,0x8338a2,0x6011060,0x803898,0x1002e160,0x57c2883,0x6068181,0x84003888,0x100eb061,0xc2810081,0x1006b002,0xc3000081,0x1005a0a1,0x28c0080,0x606a002,0x48038ab,0x100eb021,0x430b0081,0x406a002,0x450038ba,0x100eb041,0xc5000081,0x1005a081,0x6020080,0x1002a000,0xc08010a0,0x1005a0c1,0x60080,0x14000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  56. 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6c670900,0x736f505f,0x6f697469,0x100006e,0x30505,0x100,0x4000001,0xf00,0x4d50564d,0x69727461,0x78,0x30316,0x100,0x10000001,0xffff,0x65566e69,0x78657472,0x5000000,0x304,0x1000001,0x40000,0x4c00000f,0x74686769,0x4d736f50,0x6c65646f,0x4000000,0x303,0x1000001,0x31000,0x69000007,0x726f4e6e,0x6c616d,0x4040000,0x1000003,0x10000,0x7000404,0x6e690000,0x676e6154,0x746e65,0x4040000,0x1000003,0x10000,0x7000408,0x694c0000,0x56746867,0x6365,0x1050400,0x10000,0x100,0x70003,0x78655400,
  57. 0x726f6f43,0x64,0x20503,0x100,0x2040001,0x300,0x65546e69,0x6f6f4378,0x6472,0x3040300,0x10000,0xc000100,0x30004,0x0,
  58. };
  59. // Register VertShader.vsc in memory file system at application startup time
  60. static CPVRTMemoryFileSystem RegisterFile_VertShader_vsc("VertShader.vsc", _VertShader_vsc, 1077);
  61. // ******** End: VertShader.vsc ********