123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- // This file was created by Filewrap 1.1
- // Little endian mode
- // DO NOT EDIT
- #include "../PVRTMemoryFileSystem.h"
- // using 32 bit to guarantee alignment.
- #ifndef A32BIT
- #define A32BIT static const unsigned int
- #endif
- // ******** Start: VertShader.vsh ********
- // File data
- static const char _VertShader_vsh[] =
- "/******************************************************************************\r\n"
- "* Vertex Shader\r\n"
- "******************************************************************************/\r\n"
- "/* \r\n"
- "\tThe vertex and fragment shaders implement two techniques for reflections.\r\n"
- "\tWhich version is used for drawing the object is dependent on the value of \r\n"
- "\tbHighDetail. If bHighDetail is true it uses the method described in \r\n"
- "\tOGLES2PerturbedUVs and for false it uses OGLES2Reflections. \r\n"
- "\t\r\n"
- "\tReason for using 2 methods is that when the object is far away you aren't\r\n"
- "\tgoing to notice all the detail that the PerturbedUVs method adds to\r\n"
- "\tthe mesh so you may as well use a simpler method for creating reflections.\r\n"
- "\tThis way you aren't using valuable resources on something you aren't \r\n"
- "\tgoing to notice.\r\n"
- "\r\n"
- "\tAlso, when the training course is in 'low detail' mode it uses a different mesh.\r\n"
- "\tThe mesh that is being drawn contains only 7% of the original meshes vertices.\r\n"
- "*/\r\n"
- "\r\n"
- "attribute highp vec3 inVertex;\r\n"
- "attribute mediump vec3 inNormal;\r\n"
- "attribute mediump vec2 inTexCoord;\r\n"
- "attribute mediump vec3 inTangent;\r\n"
- "\r\n"
- "uniform highp mat4 MVPMatrix;\r\n"
- "uniform mediump mat3 ModelWorld;\r\n"
- "uniform mediump vec3 EyePosModel;\r\n"
- "uniform bool bHighDetail;\r\n"
- "\r\n"
- "varying mediump vec3 EyeDirection;\r\n"
- "varying mediump vec2 TexCoord;\r\n"
- "\r\n"
- "void main()\r\n"
- "{\r\n"
- "\t// Transform position\r\n"
- "\tgl_Position = MVPMatrix * vec4(inVertex,1.0);\r\n"
- "\r\n"
- "\t// Calculate direction from eye position in model space\r\n"
- "\tmediump vec3 eyeDirModel = normalize(EyePosModel - inVertex);\r\n"
- "\r\n"
- "\tif (bHighDetail)\r\n"
- "\t{\t\r\n"
- "\t\t// transform light direction from model space to tangent space\r\n"
- "\t\tmediump vec3 binormal = cross(inNormal, inTangent);\r\n"
- "\t\tmediump mat3 tangentSpaceXform = mat3(inTangent, binormal, inNormal);\r\n"
- "\t\tEyeDirection = eyeDirModel * tangentSpaceXform;\t\r\n"
- "\r\n"
- "\t\tTexCoord = inTexCoord;\r\n"
- "\t}\r\n"
- "\telse\r\n"
- "\t{\r\n"
- "\t\t// reflect eye direction over normal and transform to world space\r\n"
- "\t\tmediump vec3 reflectDir = ModelWorld * reflect(eyeDirModel, inNormal);\r\n"
- "\t\tTexCoord = normalize(reflectDir).xy * 0.5 + 0.5;\r\n"
- "\t}\r\n"
- "}\r\n";
- // Register VertShader.vsh in memory file system at application startup time
- static CPVRTMemoryFileSystem RegisterFile_VertShader_vsh("VertShader.vsh", _VertShader_vsh, 2049);
- // ******** End: VertShader.vsh ********
- // This file was created by Filewrap 1.1
- // Little endian mode
- // DO NOT EDIT
- #include "../PVRTMemoryFileSystem.h"
- // using 32 bit to guarantee alignment.
- #ifndef A32BIT
- #define A32BIT static const unsigned int
- #endif
- // ******** Start: VertShader.vsc ********
- // File data
- A32BIT _VertShader_vsc[] = {
- 0x10fab438,0xe4c3828c,0x30050100,0x2501,0xd363e337,0x2000000,0x20000000,0xd2060000,0x0,0x4000000,0x0,0x19000000,0x203,0x0,0x2020000,0x0,0x0,0xca040000,0x55535020,0x20,0x4be,0x1,0x1,0x0,0x204,0x80,0x2,0x7d,0x0,0x8,0x0,0xffffffff,0x0,0x122000a,0xffff,0x7000e,0x0,0x0,0x23,0x0,0x0,0x0,0x0,0xfffc,0x0,0x0,0x0,0xffff0003,0xffffffff,0x1a0000,0x80000e,0x140002,0x0,0x150002,0x100000,0x160002,0x1,0x170002,0x100001,0x1a0002,0x2,0x1b0002,0x100002,0x1e0002,
- 0x3,0x1f0002,0x100003,0x220002,0x4,0x230002,0x100004,0x180002,0x5,0x190002,0x100005,0x1c0002,0x6,0x1d0002,0x100006,0x200002,0x7,0x210002,0x100007,0x240002,0x8,0x250002,0x100008,0x40001,0x9,0x50001,0xa,0x80001,0xb,0x90001,0xc,0xc0001,0xd,0xd0001,0xe,0x60001,0xf,0x70001,0x10,0xa0001,0x11,0xb0001,0x12,0xe0001,0x13,0xf0001,0x14,0x10001,0x15,0x100001,0x16,0x110001,0x17,0x120001,0x18,0x130001,0x19,0x3777,0xffffffff,0xffffffff,0x0,0x0,0x4,0x20003,
- 0x10000,0x80010003,0x80018001,0x8001,0x0,0x40000,0x101,0xfd100000,0x2,0x30002,0x8001400e,0x80018000,0x0,0x0,0x4,0xe010001,0xfa100008,0x70001a54,0xe22084,0x2,0x30005,0x40148001,0x80008001,0x0,0x0,0x4,0x0,0x1000000,0x40114,0x8183fa10,0x14020060,0x30080,0x10022060,0x1800080,0x12008020,0xb00880,0x20001080,0x200a1,0xa0000,0x80010003,0x80008001,0x8001,0x0,0x40000,0x0,0x10001,0x1,0x10001,0x10001,0x101,0xfb0fa10,0x1281d000,0x9944889,0x606f060,0x4a9638ab,0x606f060,0x8b983882,0x606f060,0x1a203882,0x1001701f,0xc9a00a2,0x606f000,0x4d9c38ab,0x606f000,
- 0x8e9e3882,0x606f000,0x1a223882,0x1001705f,0x300a2,0x0,0x400000,0x4f900,0x2,0x30002,0x80018000,0x40098001,0x0,0x0,0x4,0x10109,0xfa100001,0x80000204,0x10a02002,0x2,0x30003,0x80008001,0x40098001,0x0,0x0,0x4,0x1090000,0x10100,0x2baffa10,0x1006d000,0x20400c1,0x20868020,0x200a0,0x20000,0x80000003,0x80028001,0x8001,0x0,0x40000,0x2010000,0x1,0x2c01fa10,0x2002e080,0x210e0,0x90000,0x80010003,0x80008001,0x8000,0x0,0x40000,0x10000,0x10001,0x10001,0x10001,0x1010000,0xfa100000,0xf0006f5f,0x38ab0606,0xf000b061,0x38820606,0xf000f163,0x38820606,0xf01f0081,0x831402,
- 0xa0010200,0x801006,0x80000000,0x8801202,0xa0000000,0x3888c606,0xf0ef3264,0xe01001,0x3,0x0,0xf8000040,0x40005,0x40000,0x2,0x30007,0x80018001,0x80018000,0x0,0x0,0x0,0x10000,0x10001,0x6000001,0x1001a0e0,0x6802881,0x1001a100,0x5052881,0x6068001,0x840038ab,0x100eb021,0x82810081,0x1003b001,0x82090089,0x20520c1,0x450138aa,0x100eb001,0x20081,0x20000,0x80000003,0x80018001,0x8001,0x0,0x40000,0x1010000,0x1,0x280fa10,0x10022040,0x210a0,0x50000,0x80010003,0x80f78000,0x8002,0x0,0x40000,0x10000,0x1,0x100f702,0xfa100000,0x80020285,0x38ab0606,0xb0210480,0x81100e,0xb0018481,0x811002,
- 0xa0810500,0xa01001,0x4,0x60005,0x28000000,0x803f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0x0,0x0,0x0,0x6e690b00,0x74726556,0x7865,0x3040400,0x10000,0x100,0x70004,0x5f6c6700,0x69736f50,0x6e6f6974,0x5010000,0x305,0x1000001,0x40000,0x4d00000f,0x614d5056,0x78697274,0x16000000,0x303,
- 0x1000001,0xff100400,0x450000ff,0x6f506579,0x646f4d73,0x6c65,0x2030400,0x10000,0x14000100,0x70003,0x69486200,0x65446867,0x6c696174,0xa000000,0x3,0x1000001,0x10100,0x69000001,0x726f4e6e,0x6c616d,0x4040000,0x1000002,0x10000,0x7000404,0x6e690000,0x676e6154,0x746e65,0x4040000,0x1000002,0x10000,0x7000408,0x79450000,0x72694465,0x69746365,0x6e6f,0x2050400,0x10000,0x100,0x70003,0x78655400,0x726f6f43,0x64,0x20503,0x100,0x2040001,0x300,0x65546e69,0x6f6f4378,0x6472,0x2040300,0x10000,0xc000100,0x30004,0x646f4d00,0x6f576c65,0x646c72,0x3120000,0x1000002,0x10000,0x77070c18,0x0,
- };
- // Register VertShader.vsc in memory file system at application startup time
- static CPVRTMemoryFileSystem RegisterFile_VertShader_vsc("VertShader.vsc", _VertShader_vsc, 1778);
- // ******** End: VertShader.vsc ********
|