SkyboxVShader.cpp 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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: SkyboxVShader.vsh ********
  10. // File data
  11. static const char _SkyboxVShader_vsh[] =
  12. "attribute mediump vec3 inVertex;\r\n"
  13. "\r\n"
  14. "uniform mediump mat4 ModelMatrix;\r\n"
  15. "uniform mediump mat4 ModelViewMatrix;\r\n"
  16. "uniform mediump mat4 MVPMatrix;\r\n"
  17. "#ifdef ENABLE_FOG_DEPTH\r\n"
  18. "uniform mediump float WaterHeight;\t\t//Assume water always lies on the y-axis\r\n"
  19. "#endif\r\n"
  20. "#ifdef ENABLE_DISCARD_CLIP\r\n"
  21. "uniform bool ClipPlaneBool;\r\n"
  22. "uniform mediump vec4 ClipPlane;\r\n"
  23. "#endif\r\n"
  24. "\r\n"
  25. "varying mediump vec3 EyeDir;\r\n"
  26. "#ifdef ENABLE_FOG_DEPTH\r\n"
  27. "varying mediump float VertexDepth;\r\n"
  28. "#endif\r\n"
  29. "#ifdef ENABLE_DISCARD_CLIP\r\n"
  30. "varying highp float ClipDist;\r\n"
  31. "#endif\r\n"
  32. "\r\n"
  33. "void main()\r\n"
  34. "{\r\n"
  35. "\tEyeDir = -inVertex;\r\n"
  36. "\tgl_Position = MVPMatrix * vec4(inVertex, 1.0);\r\n"
  37. "\t\r\n"
  38. "\t#ifdef ENABLE_DISCARD_CLIP\r\n"
  39. "\t\t// Compute the distance between the vertex and clipping plane (in world space coord system)\r\n"
  40. "\t\tmediump vec4 vVertexView = ModelMatrix * vec4(inVertex.xyz,1.0);\r\n"
  41. "\t\tClipDist = dot(vVertexView, ClipPlane);\r\n"
  42. "\t#endif\r\n"
  43. "\t\r\n"
  44. "\t#ifdef ENABLE_FOG_DEPTH\r\n"
  45. "\t\t// Calculate the vertex's distance under water surface. This assumes clipping has removed all objects above the water\r\n"
  46. "\t\tmediump float vVertexHeight = (ModelMatrix * vec4(inVertex,1.0)).y;\r\n"
  47. "\t\tVertexDepth = WaterHeight - vVertexHeight;\r\n"
  48. "\t#endif\r\n"
  49. "}";
  50. // Register SkyboxVShader.vsh in memory file system at application startup time
  51. static CPVRTMemoryFileSystem RegisterFile_SkyboxVShader_vsh("SkyboxVShader.vsh", _SkyboxVShader_vsh, 1133);
  52. // ******** End: SkyboxVShader.vsh ********
  53. // This file was created by Filewrap 1.1
  54. // Little endian mode
  55. // DO NOT EDIT
  56. #include "../PVRTMemoryFileSystem.h"
  57. // using 32 bit to guarantee alignment.
  58. #ifndef A32BIT
  59. #define A32BIT static const unsigned int
  60. #endif
  61. // ******** Start: SkyboxVShader.vsc ********
  62. // File data
  63. A32BIT _SkyboxVShader_vsc[] = {
  64. 0x10fab438,0x80720e3d,0x30050100,0x2501,0xd363e337,0x2000000,0x20000000,0x88020000,0x0,0x4000000,0x0,0x9000000,0x3,0x0,0x20000,0x0,0x0,0x9e010000,0x55535020,0x20,0x192,0x1,0x1,0x0,0x204,0x80,0x2,0x7d,0x0,0x8,0x0,0xffffffff,0x0,0x122000a,0xffff,0x3,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0xfffc,0x0,0x0,0x0,0xffff0003,0xffffffff,0x80000,0x800003,0x40002,0x0,0x50002,0x100000,0x80002,0x1,0x90002,0x100001,0xc0002,0x2,0xd0002,0x100002,0x100002,
  65. 0x3,0x110002,0x100003,0x60002,0x4,0x70002,0x100004,0xa0002,0x5,0xb0002,0x100005,0xe0002,0x6,0xf0002,0x100006,0x120002,0x7,0x130002,0x100007,0x7,0xffffffff,0xffffffff,0x0,0x0,0x4,0x20003,0xa0000,0x80010003,0x80018001,0x8001,0x0,0x40000,0x0,0x10001,0x1,0x10001,0x1010001,0x0,0x1a30fd10,0x20855080,0x2a5500a3,0x605f000,0x6b5738ab,0x605f000,0xac593882,0x605f000,0x1a5a3882,0x1001700f,0x2e5d00e2,0x606f000,0x6f5f38ab,0x606f000,0xb0613882,0x606f000,0x1a623882,0x1001704f,0x600e2,0x14000000,0x803f,0x0,0x0,0x0,0x0,0x0,
  66. 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x79450400,0x72694465,0x4000000,0x205,0x1000001,0x30000,0x69000007,0x7265566e,0x786574,0x4040000,0x1000002,0x10000,0x7000400,0x564d0000,0x74614d50,0x786972,0x3160000,0x1000002,0x10000,0xffff1004,0x6c670000,0x736f505f,0x6f697469,0x100006e,0x30505,0x100,0x4000001,0xf00,0x0,
  67. };
  68. // Register SkyboxVShader.vsc in memory file system at application startup time
  69. static CPVRTMemoryFileSystem RegisterFile_SkyboxVShader_vsc("SkyboxVShader.vsc", _SkyboxVShader_vsc, 680);
  70. // ******** End: SkyboxVShader.vsc ********