SkinnedFragShader.cpp 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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: SkinnedFragShader.fsh ********
  10. // File data
  11. static const char _SkinnedFragShader_fsh[] =
  12. "uniform sampler2D sTexture;\r\n"
  13. "uniform sampler2D sNormalMap;\r\n"
  14. "uniform bool bUseDot3;\r\n"
  15. "\r\n"
  16. "varying mediump vec2 TexCoord;\r\n"
  17. "varying mediump vec3 Light;\r\n"
  18. "\r\n"
  19. "void main()\r\n"
  20. "{\r\n"
  21. "\tif(bUseDot3)\r\n"
  22. "\t{\r\n"
  23. "\t\t/*\r\n"
  24. "\t\t\tNote:\r\n"
  25. "\t\t\tIn the normal map red = y, green = x, blue = z which is why when we get the normal\r\n"
  26. "\t\t\tfrom the texture we use the swizzle .grb so the colours are mapped to the correct\r\n"
  27. "\t\t\tco-ordinate variable.\r\n"
  28. "\t\t*/\r\n"
  29. "\r\n"
  30. "\t\tmediump vec3 fNormal = texture2D(sNormalMap, TexCoord).grb;\r\n"
  31. "\t\tmediump float fNDotL = dot((fNormal - 0.5) * 2.0, Light);\r\n"
  32. "\t\t\r\n"
  33. "\t\tgl_FragColor = texture2D(sTexture, TexCoord) * fNDotL;\r\n"
  34. " }\r\n"
  35. " else\r\n"
  36. "\t\tgl_FragColor = texture2D(sTexture, TexCoord) * Light.x;\r\n"
  37. "}\r\n";
  38. // Register SkinnedFragShader.fsh in memory file system at application startup time
  39. static CPVRTMemoryFileSystem RegisterFile_SkinnedFragShader_fsh("SkinnedFragShader.fsh", _SkinnedFragShader_fsh, 672);
  40. // ******** End: SkinnedFragShader.fsh ********
  41. // This file was created by Filewrap 1.1
  42. // Little endian mode
  43. // DO NOT EDIT
  44. #include "../PVRTMemoryFileSystem.h"
  45. // using 32 bit to guarantee alignment.
  46. #ifndef A32BIT
  47. #define A32BIT static const unsigned int
  48. #endif
  49. // ******** Start: SkinnedFragShader.fsc ********
  50. // File data
  51. A32BIT _SkinnedFragShader_fsc[] = {
  52. 0x10fab438,0x5195265c,0x30050100,0x2501,0xd363e337,0x2000000,0x20000000,0x4e070000,0x1000000,0x4000000,0x0,0x18000000,0x203,0x0,0x2020000,0x0,0x0,0x3a030000,0x55535020,0x20,0x32e,0x1,0x0,0x0,0x224,0x80,0x2,0x7d,0x0,0x8,0x0,0xffffffff,0x0,0x770009,0xffff,0x50004,0x0,0x30000,0x3,0x0,0x0,0x0,0x0,0x3fffc,0x40001,0x1,0x1,0xffff0003,0xffffffff,0x20000,0x800000,0x4,0x30001,0x20002,0x0,0x2,0x10000,0x10000,0x2,0x10000,0x40002,0x0,0x50002,0x100000,
  53. 0x1,0x1,0xffffffff,0xffffffff,0x0,0x0,0x4,0x20003,0x20000,0x80010003,0x80018001,0x8001,0x0,0x40000,0x1010000,0x0,0x530fd10,0x1281d000,0x348a9,0x0,0x400000,0x4f900,0x5,0x30001,0x80018001,0x80018001,0x0,0x0,0x10000,0xf000f,0x30688,0x30003,0x10003,0x20001,0x20002,0x20002,0x2,0x2,0x10002,0x0,0x20000,0x20002,0x40000,0x80010003,0x80018001,0x8001,0x0,0x0,0x11,0x21430011,0x606a030,0x138ab,0x1c3ef024,0x22454083,0x606a010,0x138ab,0x1c26f024,0x34083,0x0,0x400000,0x5f800,0x4,0x20004,0x10000,
  54. 0x80010003,0x80018001,0x8001,0x0,0x0,0xa0200000,0x28831000,0x5,0x30001,0x80018001,0x80018001,0x0,0x0,0x0,0x70007,0x10688,0x10001,0x0,0x10000,0x20000,0x20002,0x0,0x2,0x10000,0x2,0x20000,0x20002,0x60000,0x80010003,0x80018001,0x8001,0x0,0x0,0x0,0x0,0x5a520000,0x100a7050,0x1a5200c2,0x10087010,0x9a5200c2,0x10087030,0xa9b000c2,0x1004d040,0x29b000c1,0x1000d060,0x69b000c1,0x1000d080,0x200c1,0x20000,0x80000003,0x80018001,0x8001,0x0,0x40000,0x1010000,0x1,0x140fa10,0x20002000,0x510e0,0x10000,0x80000003,0x80018001,0x8001,0x0,
  55. 0x0,0xf0001,0x688000f,0x30003,0x30003,0x10001,0x20002,0x20002,0x20002,0x20000,0x20000,0x10001,0x0,0x20002,0x2,0x30004,0x80018000,0x80018001,0x0,0x0,0x110000,0x110000,0xa0002143,0x38ab0602,0xf0240001,0x40831c3e,0xa0002245,0x38ab0602,0xf0240001,0x40831c26,0x4,0x60005,0x0,0x50203e03,0x205553,0x3320000,0x10000,0x0,0x0,0x2a40000,0x800000,0x20000,0x7d0000,0x0,0x80000,0x0,0xffff0000,0xffff,0x90000,0xffff0077,0x40000,0x3,0x0,0x30003,0x0,0x0,0x0,0x0,0xfffc0000,0x1,0x10004,0x0,0x30000,0xffffffff,
  56. 0xffff,0x2,0x40080,0x10000,0x20003,0x2,0x20000,0x0,0x1,0x20001,0x0,0x20001,0x4,0x20000,0x5,0x10010,0x10000,0xffff0000,0xffffffff,0xffff,0x0,0x40000,0x30000,0x2,0x30002,0x80018001,0x80018001,0x0,0x0,0x4,0x101,0xfd100000,0xd0000530,0x48a91281,0x3,0x0,0xf9000040,0x50004,0x10000,0x80010003,0x80018001,0x8001,0x0,0x0,0xf0001,0x688000f,0x10001,0x10001,0x0,0x10001,0x20002,0x20002,0x20000,0x20000,0x20001,0x0,0x20002,0x2,0x30004,0x80018001,0x80018001,0x0,0x0,0x10000,
  57. 0x10000,0x102041,0x38ab0604,0xf0040001,0x40831c3c,0x302143,0x38ab0604,0xf0040001,0x40831c24,0x3,0x0,0xf8000040,0x40005,0x40000,0x2,0x30001,0x80018001,0x80018001,0x0,0x0,0x0,0x1000a040,0x52883,0x10000,0x80010003,0x80018001,0x8001,0x0,0x0,0x70000,0x6880007,0x10001,0x1,0x10001,0x2,0x20002,0x2,0x20000,0x0,0x30001,0x0,0x20002,0x2,0x30002,0x40218001,0x80008000,0x0,0x0,0x4,0x1210000,0xfa100004,0x70109a52,0xe22008,0x2,0x30002,0x80018001,0x80008000,0x0,0x0,0x4,0x1010000,0xfa100000,0xd00029b0,0xe12000,
  58. 0x2,0x30002,0x80018000,0x80018001,0x0,0x0,0x4,0x10101,0xfa100000,0x20400040,0x10e02000,0x5,0x30001,0x80018000,0x80018001,0x0,0x0,0x10000,0xf000f,0x10688,0x10001,0x1,0x10000,0x20001,0x20002,0x2,0x2,0x10002,0x3,0x20000,0x20002,0x40000,0x80000003,0x80018001,0x8001,0x0,0x0,0x1,0xa0410001,0x6000000,0x138ab,0x1c3cf004,0xa1434083,0x6000020,0x138ab,0x1c24f004,0x44083,0x50000,0x6,0x800,0x0,0x0,0x0,0x3f0000,0x400000,0x0,0x0,0x5000000,0x65735562,0x33746f44,0xa000000,0x3,0x1000001,0x10000,
  59. 0x73000001,0x6d726f4e,0x614d6c61,0x70,0x10318,0x100,0x1000002,0x100,0x43786554,0x64726f6f,0x3000000,0x206,0x1000001,0x20400,0x4c000003,0x74686769,0x4000000,0x206,0x1000001,0x30000,0x73000007,0x74786554,0x657275,0x3180000,0x1000001,0x20000,0x1000101,0x0,
  60. };
  61. // Register SkinnedFragShader.fsc in memory file system at application startup time
  62. static CPVRTMemoryFileSystem RegisterFile_SkinnedFragShader_fsc("SkinnedFragShader.fsc", _SkinnedFragShader_fsc, 1902);
  63. // ******** End: SkinnedFragShader.fsc ********