1// This file was created by Filewrap 1.1 2// Little endian mode 3// DO NOT EDIT 4 5#include "../PVRTMemoryFileSystem.h" 6 7// using 32 bit to guarantee alignment. 8#ifndef A32BIT 9 #define A32BIT static const unsigned int 10#endif 11 12// ******** Start: SkinnedFragShader.fsh ******** 13 14// File data 15static const char _SkinnedFragShader_fsh[] = 16 "uniform sampler2D sTexture;\n" 17 "uniform sampler2D sNormalMap;\n" 18 "uniform bool bUseDot3;\n" 19 "\n" 20 "varying mediump vec2 TexCoord;\n" 21 "varying mediump vec3 Light;\n" 22 "\n" 23 "void main()\n" 24 "{\n" 25 "\tif(bUseDot3)\n" 26 "\t{\n" 27 "\t\t/*\n" 28 "\t\t\tNote:\n" 29 "\t\t\tIn the normal map red = y, green = x, blue = z which is why when we get the normal\n" 30 "\t\t\tfrom the texture we use the swizzle .grb so the colours are mapped to the correct\n" 31 "\t\t\tco-ordinate variable.\n" 32 "\t\t*/\n" 33 "\n" 34 "\t\tmediump vec3 fNormal = texture2D(sNormalMap, TexCoord).grb;\n" 35 "\t\tmediump float fNDotL = dot((fNormal - 0.5) * 2.0, Light);\n" 36 "\t\t\n" 37 "\t\tgl_FragColor = texture2D(sTexture, TexCoord) * fNDotL;\n" 38 " }\n" 39 " else\n" 40 "\t\tgl_FragColor = texture2D(sTexture, TexCoord) * Light.x;\n" 41 "}\n"; 42 43// Register SkinnedFragShader.fsh in memory file system at application startup time 44static CPVRTMemoryFileSystem RegisterFile_SkinnedFragShader_fsh("SkinnedFragShader.fsh", _SkinnedFragShader_fsh, 646); 45 46// ******** End: SkinnedFragShader.fsh ******** 47 48