123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- // 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[] =
- "attribute highp vec3 inVertex;\r\n"
- "attribute mediump vec3 inNormal;\r\n"
- "\r\n"
- "uniform highp mat4 MVPMatrix;\r\n"
- "uniform mediump vec3 LightDirModel;\r\n"
- "uniform mediump vec3 EyePosModel;\r\n"
- "uniform bool bSpecular;\r\n"
- "uniform\t\t\tbool bRotate;\r\n"
- "\r\n"
- "varying lowp float SpecularIntensity;\r\n"
- "varying mediump vec2 RefractCoord;\r\n"
- "\r\n"
- "const mediump float cShininess = 3.0;\r\n"
- "const mediump float cRIR = 1.015;\r\n"
- "\r\n"
- "void main()\r\n"
- "{\r\n"
- "\t// Transform position\r\n"
- "\tgl_Position = MVPMatrix * vec4(inVertex, 1.0);\r\n"
- "\t\r\n"
- "\t// Eye direction in model space\r\n"
- "\tmediump vec3 eyeDirModel = normalize(inVertex - EyePosModel);\t\r\n"
- "\t\r\n"
- "\t// GLSL offers a nice built-in refaction function\r\n"
- "\t// Calculate refraction direction in model space\r\n"
- "\tmediump vec3 refractDir = refract(eyeDirModel, inNormal, cRIR);\r\n"
- "\t\r\n"
- "\t// Project refraction\r\n"
- "\trefractDir = (MVPMatrix * vec4(refractDir, 0.0)).xyw;\r\n"
- "\r\n"
- "\t// Map refraction direction to 2d coordinates\r\n"
- "\tRefractCoord = 0.5 * (refractDir.xy / refractDir.z) + 0.5;\r\n"
- "\r\n"
- "\tif(bRotate) // If the screen is rotated then rotate the uvs\r\n"
- "\t{\r\n"
- "\t\tRefractCoord.xy = RefractCoord.yx;\r\n"
- "\t\tRefractCoord.y = -RefractCoord.y;\r\n"
- "\t}\r\n"
- "\t\t\r\n"
- "\t// Specular lighting\r\n"
- "\t// We ignore that N dot L could be negative (light coming \r\n"
- "\t// from behind the surface)\r\n"
- "\tSpecularIntensity = 0.0;\r\n"
- "\r\n"
- "\tif (bSpecular)\r\n"
- "\t{\r\n"
- "\t\tmediump vec3 halfVector = normalize(LightDirModel + eyeDirModel);\r\n"
- "\t\tlowp float NdotH = max(dot(inNormal, halfVector), 0.0);\t\t\r\n"
- "\t\tSpecularIntensity = pow(NdotH, cShininess);\r\n"
- "\t}\r\n"
- "}";
- // Register VertShader.vsh in memory file system at application startup time
- static CPVRTMemoryFileSystem RegisterFile_VertShader_vsh("VertShader.vsh", _VertShader_vsh, 1457);
- // ******** 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,0x6a2f139e,0x30050100,0x2501,0xd363e337,0x2000000,0x20000000,0xf5060000,0x0,0x4000000,0x0,0x19000000,0x202,0x0,0x1020000,0x0,0x0,0x2050000,0x55535020,0x20,0x4f6,0x1,0x1,0x0,0x204,0x4,0x2,0x7d,0x0,0x8,0x0,0xffffffff,0x0,0x122000a,0xffff,0x70007,0x0,0x0,0x20,0x0,0x0,0x0,0x0,0xfffc,0x0,0x0,0x0,0xffff0003,0xffffffff,0x1a0001,0x800007,0x180002,0x0,0x190002,0x100000,0x140002,0x1,0x150002,0x100001,0x160002,0x2,0x170002,0x100002,0x1a0002,
- 0x3,0x1b0002,0x100003,0x200002,0x4,0x210002,0x100004,0x220002,0x5,0x230002,0x100005,0x240002,0x6,0x250002,0x100006,0x40001,0x7,0x50001,0x8,0x70001,0x9,0x80001,0xa,0x90001,0xb,0xb0001,0xc,0xc0001,0xd,0xd0001,0xe,0xf0001,0xf,0x100001,0x10,0x110001,0x11,0x130001,0x12,0x10001,0x13,0x30001,0x14,0x60001,0x15,0xa0001,0x16,0xe0001,0x17,0x120001,0x18,0x94752a30,0xc11006,0x77,0xffffffff,0xffffffff,0x0,0x0,0x4,0x20003,0x170000,0x80010002,0x80018001,0x8001,
- 0x0,0x0,0x0,0x0,0x0,0x10000,0x10001,0x1,0x10001,0x10001,0x10001,0x10001,0x10001,0x70401a56,0xc2100c,0x70005a57,0xc2100d,0x70009a58,0xc2100c,0x50608000,0x801402,0x20600003,0x801002,0x80200180,0x8801200,0x106000b0,0x811000,0xf0600f93,0x38ab0606,0xf0605016,0x38820606,0xf0609099,0x38820606,0x705f1a22,0x821001,0x707f5a1c,0x821001,0x10604100,0x38ab0602,0xe0400080,0x28831000,0xa0614200,0x38a0c006,0x20018183,0x801004,0x10600034,0x811082,0xd060d1b4,0x811026,0x900001b0,0x48891681,0xf0200892,0x38880604,0xf0004a15,0x38820606,0xf0008b98,0x38820606,0x701f1a1a,0xa21001,0x3,0x0,0xf9000040,0x20004,0x30000,
- 0x80010002,0x80018001,0x8001,0x0,0x0,0x0,0x80000180,0x8801202,0x80000000,0x8801002,0xe0602a00,0xc01002,0x2,0x20002,0x80018001,0x80008000,0x0,0x0,0x4,0x1010000,0xfa100000,0xd0006a30,0xe12002,0x2,0x20002,0x80008001,0x80018001,0x0,0x0,0x4,0x1000101,0xfa100000,0xa080c200,0xa02084,0x4,0x20004,0x20000,0x80000002,0x80038001,0x8001,0x0,0x40000,0x3010000,0x1,0x984fa10,0x2002c000,0x210a0,0x80000,0x80010002,0x80008001,0x8000,0x0,0x40000,0x0,0x10000,0x10001,0x1,0x101,0xfa10,0x10028020,0xeb00880,0x1281d000,0x8924889,0x602f001,
- 0x4a1538ab,0x602f001,0x8b983882,0x602f001,0x40803882,0xc606a000,0x2ddb3888,0x1001f08f,0x300e0,0x0,0x400000,0x5fd00,0x2,0x20003,0x80018001,0x80008000,0x0,0x0,0x0,0x2000000,0x10026000,0x2802881,0x10016080,0x1a302881,0x108550a0,0x40083,0x50000,0x2,0x20002,0x80018001,0x80008000,0x0,0x0,0x0,0xa0c00000,0x28831001,0xd0000f30,0x48891281,0x3,0x0,0xfd000040,0x20006,0xd0000,0x80ff0002,0x80008001,0x8001,0x0,0x40000,0x0,0x0,0x0,0x1,0x0,0x0,0xff010001,0xfa100000,0x70605a5c,0xe22002,0xa000c102,0x801406,0xa0004080,0x801006,0x80000000,0x8801202,
- 0x90204030,0x811006,0xa0000182,0x38ab0606,0xa0014200,0x38a0c006,0xa0018080,0x801006,0x90000030,0x18811202,0x80000000,0x8801442,0xd0003030,0xc11006,0x80c00000,0x8801601,0x4,0x60006,0x28000000,0x803f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x803f,0x85eb813f,0x0,0x0,0x3f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4040,0x0,0x0,0x0,0x6e690a00,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,0x4e6e6900,0x616d726f,0x6c,0x20404,0x100,0x4040001,0x700,0x72666552,0x43746361,0x64726f6f,0x3000000,0x205,0x1000001,0x20000,0x62000003,0x61746f52,0x6574,0x30a00,0x10000,0x1000100,0x10001,0x65705300,0x616c7563,0x746e4972,0x69736e65,0x7974,0x1050200,0x10000,0x4000100,0x10001,0x70536200,0x6c756365,0x7261,0x30a00,0x10000,0x3000100,0x10001,0x67694c00,0x69447468,0x646f4d72,
- 0x6c65,0x2030400,0x10000,0x20000100,0x70003,0x0,
- };
- // Register VertShader.vsc in memory file system at application startup time
- static CPVRTMemoryFileSystem RegisterFile_VertShader_vsc("VertShader.vsc", _VertShader_vsc, 1813);
- // ******** End: VertShader.vsc ********
|