SkyboxFShader.cpp 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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: SkyboxFShader.fsh ********
  10. // File data
  11. static const char _SkyboxFShader_fsh[] =
  12. "uniform samplerCube CubeMap;\r\n"
  13. "\r\n"
  14. "#ifdef ENABLE_FOG_DEPTH\r\n"
  15. "uniform lowp vec3 FogColour;\r\n"
  16. "uniform mediump float RcpMaxFogDepth;\r\n"
  17. "#endif\r\n"
  18. "#ifdef ENABLE_DISCARD_CLIP\r\n"
  19. "uniform bool ClipPlaneBool;\r\n"
  20. "#endif\r\n"
  21. "\r\n"
  22. "varying mediump vec3 EyeDir;\r\n"
  23. "#ifdef ENABLE_FOG_DEPTH\r\n"
  24. "varying mediump float VertexDepth;\r\n"
  25. "#endif\r\n"
  26. "#ifdef ENABLE_DISCARD_CLIP\r\n"
  27. "varying highp float ClipDist;\r\n"
  28. "#endif\r\n"
  29. "\r\n"
  30. "void main()\r\n"
  31. "{\r\n"
  32. "\t#ifdef ENABLE_DISCARD_CLIP\r\n"
  33. "\t\t// Reject fragments behind the clip plane\r\n"
  34. "\t\tif(ClipDist < 0.0)\r\n"
  35. "\t\t{\r\n"
  36. "\t\t\tdiscard; // Too slow for hardware. Left as an example of how not to do this!\r\n"
  37. "\t\t}\r\n"
  38. "\t#endif\r\n"
  39. "\t\r\n"
  40. "\t#ifdef ENABLE_FOG_DEPTH\r\n"
  41. "\t\t// Mix the object's colour with the fogging colour based on fragment's depth\r\n"
  42. "\t\tlowp vec3 vFragColour = textureCube(CubeMap, EyeDir).rgb;\r\n"
  43. "\t\t\r\n"
  44. "\t\t// Test depth\r\n"
  45. "\t\tlowp float fFogBlend = clamp(VertexDepth * RcpMaxFogDepth, 0.0, 1.0);\r\n"
  46. "\t\tvFragColour.rgb = mix(vFragColour.rgb, FogColour.rgb, fFogBlend);\r\n"
  47. "\t\t\t\r\n"
  48. "\t\tgl_FragColor = vec4(vFragColour.rgb, 1.0);\r\n"
  49. "\t#else\r\n"
  50. "\t\tgl_FragColor = textureCube(CubeMap, EyeDir);\r\n"
  51. "\t\t\r\n"
  52. "\t#endif\r\n"
  53. "}";
  54. // Register SkyboxFShader.fsh in memory file system at application startup time
  55. static CPVRTMemoryFileSystem RegisterFile_SkyboxFShader_fsh("SkyboxFShader.fsh", _SkyboxFShader_fsh, 1035);
  56. // ******** End: SkyboxFShader.fsh ********
  57. // This file was created by Filewrap 1.1
  58. // Little endian mode
  59. // DO NOT EDIT
  60. #include "../PVRTMemoryFileSystem.h"
  61. // using 32 bit to guarantee alignment.
  62. #ifndef A32BIT
  63. #define A32BIT static const unsigned int
  64. #endif
  65. // ******** Start: SkyboxFShader.fsc ********
  66. // File data
  67. A32BIT _SkyboxFShader_fsc[] = {
  68. 0x10fab438,0x3b2a219e,0x30050100,0x2501,0xd363e337,0x2000000,0x20000000,0x53020000,0x1000000,0x4000000,0x0,0x8000000,0x3,0x0,0x20000,0x0,0x0,0xf8000000,0x55535020,0x20,0xec,0x1,0x0,0x0,0x224,0x80,0x2,0x7d,0x0,0x0,0x0,0xffffffff,0x0,0x770009,0xffff,0x1,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x3fffc,0x40000,0x1,0x0,0xffff0003,0xffffffff,0x0,0x800000,0x0,0x1,0x10000,0xffffffff,0xffffffff,0x0,0x0,0x4,0x50003,0x10000,0x80010002,0x80018001,0x8001,
  69. 0x0,0x100000,0xf0000,0x60a000f,0x30003,0x30003,0x0,0x0,0x40004,0x40004,0x10000,0x30002,0x10001,0x0,0x30001,0x6,0xf8000000,0x55535020,0x20,0xec,0x1,0x0,0x0,0x2a4,0x80,0x2,0x7d,0x0,0x0,0x0,0xffffffff,0x0,0x770009,0xffff,0x10001,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x1fffc,0x40000,0x1,0x0,0xffff0003,0xffffffff,0x0,0x800000,0x0,0x1,0x10000,0xffffffff,0xffffffff,0x0,0x0,0x4,0x50003,0x10000,0x80010002,0x80018001,0x8001,0x0,
  70. 0x0,0xf0000,0x60a000f,0x10001,0x10001,0x0,0x0,0x40004,0x40004,0x10000,0x30002,0x10001,0x0,0x30001,0x6,0x2000000,0x65627543,0x70614d,0x31a0000,0x1000001,0x20000,0x1000100,0x79450000,0x72694465,0x4000000,0x206,0x1000001,0x30000,0x7,
  71. };
  72. // Register SkyboxFShader.fsc in memory file system at application startup time
  73. static CPVRTMemoryFileSystem RegisterFile_SkyboxFShader_fsc("SkyboxFShader.fsc", _SkyboxFShader_fsc, 627);
  74. // ******** End: SkyboxFShader.fsc ********