123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- // 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: PostFragShader.fsh ********
- // File data
- static const char _PostFragShader_fsh[] =
- "uniform sampler2D sColorBufferTexture;\t// Texture containing color info in rgb and an object ID value in the alpha channel.\r\n"
- "varying mediump vec2 t1;\t\t\t\t// Texture coordinate for this fragment.\r\n"
- "//#define EDGE_DETECTION\r\n"
- "//#define INVERSE\t\t\tThese are for editing only, leave disabled as they are passed in by the main program\r\n"
- "//#define BLUR\r\n"
- "\r\n"
- "#ifdef EDGE_DETECTION\r\n"
- "varying mediump vec2 t2;\t\t\t\t// Texel directly above this fragment's.\r\n"
- "varying mediump vec2 t3;\t\t\t\t// Texel directly to the right of this fragment's.\r\n"
- "#endif\r\n"
- "\r\n"
- "const lowp vec3 black = vec3(0.0);\r\n"
- "\r\n"
- "void main()\r\n"
- "{\r\n"
- "\t// Gets the color from the render texture.\r\n"
- "\tlowp vec4 Color = texture2D(sColorBufferTexture, t1);\r\n"
- "\t\t\r\n"
- "\t// Temporary color store to be written to, data transferred to gl_FragColor at the end.\r\n"
- "\tlowp vec3 newColor=Color.rgb;\r\n"
- "\t\r\n"
- "#ifdef EDGE_DETECTION\r\n"
- "\t// Reads in values from the color texture, for two surrounding texels;\r\n"
- "\tlowp vec4 upFrag = texture2D(sColorBufferTexture, t2);\r\n"
- "\tlowp vec4 rightFrag = texture2D(sColorBufferTexture, t3);\r\n"
- "\t\r\n"
- "\t// If the object IDs covering this area differ, draw an edge\r\n"
- "\tif(upFrag.a-Color.a!=0.0 || rightFrag.a-Color.a!=0.0)\r\n"
- "\t{\r\n"
- "\t#ifdef INVERSE\r\n"
- "\t\t// Sets edge color to inverse of original color.\r\n"
- "\t\tnewColor=1.0-Color.rgb;\r\n"
- "\t#else \r\n"
- "\t#ifdef BLUR\r\n"
- "\t\t// Sets edge to a mixture of surrounding colors.\r\n"
- "\t\tnewColor=(2.0*Color.rgb+upFrag.rgb+rightFrag.rgb)*0.25;\r\n"
- "\t#else\r\n"
- "\t\t// Sets edge to black\r\n"
- "\t\tnewColor=black;\r\n"
- "\t#endif\r\n"
- "\t#endif\r\n"
- "\t}\r\n"
- "\telse\r\n"
- "\t{\r\n"
- "\t#ifdef INVERSE\r\n"
- "\t\t//Sets non-edges to black\r\n"
- "\t\tnewColor=black;\r\n"
- "\t#endif\r\n"
- "\t}\r\n"
- "#endif\r\n"
- "\r\n"
- "\t// Finally assigns gl_FragColor, with a default alpha value of 1.\r\n"
- "\tgl_FragColor=vec4(newColor,1.0);\r\n"
- "}";
- // Register PostFragShader.fsh in memory file system at application startup time
- static CPVRTMemoryFileSystem RegisterFile_PostFragShader_fsh("PostFragShader.fsh", _PostFragShader_fsh, 1659);
- // ******** End: PostFragShader.fsh ********
- // 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: PostFragShader.fsc ********
- // File data
- A32BIT _PostFragShader_fsc[] = {
- 0x10fab438,0xd7c19769,0x30050100,0x2501,0xd363e337,0x2000000,0x20000000,0x3030000,0x1000000,0x4000000,0x0,0x8000000,0x2,0x0,0x20000,0x0,0x0,0x44010000,0x55535020,0x20,0x138,0x1,0x0,0x0,0x224,0x0,0x2,0x7d,0x0,0x8,0x0,0xffffffff,0x0,0x770009,0xffff,0x1,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x3fffc,0x40000,0x1,0x0,0xffff0003,0xffffffff,0x10001,0x800000,0x0,0x1,0x10000,0x9120c038,0x4083103e,0xffffffff,0xffffffff,0x0,0x0,0x4,0x20003,0x10000,0x80010002,
- 0x80018001,0x8001,0x0,0x40000,0xa0000000,0x28031000,0x5,0x20001,0x80018001,0x80018001,0x0,0x0,0x10,0x70007,0x3060a,0x30003,0x0,0x0,0x40000,0x40004,0x0,0x20001,0x10000,0x1,0x10000,0x20002,0x10000,0x80010002,0x80018001,0x8001,0x0,0x100000,0xe0030480,0x40811022,0x6,0x44010000,0x55535020,0x20,0x138,0x1,0x0,0x0,0x2a4,0x0,0x2,0x7d,0x0,0x8,0x0,0xffffffff,0x0,0x770009,0xffff,0x10001,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x1fffc,0x40000,0x1,
- 0x0,0xffff0003,0xffffffff,0x10001,0x800000,0x0,0x1,0x10000,0x9120c038,0x4083103e,0xffffffff,0xffffffff,0x0,0x0,0x4,0x20003,0x10000,0x80010002,0x80018001,0x8001,0x0,0x0,0xa0000000,0x28831000,0x5,0x20001,0x80018001,0x80018001,0x0,0x0,0x0,0x70007,0x1060a,0x10001,0x0,0x0,0x40000,0x40004,0x0,0x20001,0x10000,0x1,0x10000,0x20002,0x10000,0x80010002,0x80018001,0x8001,0x0,0x0,0xe0030480,0x40811020,0x6,0x400,0x0,0x0,0x803f0000,0x2000000,0x6c6f4373,0x7542726f,0x72656666,0x74786554,0x657275,0x3180000,
- 0x1000001,0x20000,0x1000100,0x31740000,0x3000000,0x206,0x1000001,0x20000,0x3,
- };
- // Register PostFragShader.fsc in memory file system at application startup time
- static CPVRTMemoryFileSystem RegisterFile_PostFragShader_fsc("PostFragShader.fsc", _PostFragShader_fsc, 803);
- // ******** End: PostFragShader.fsc ********
|