1bf215546Sopenharmony_ci/************************************************************************** 2bf215546Sopenharmony_ci * 3bf215546Sopenharmony_ci * Copyright 2011 Lauri Kasanen 4bf215546Sopenharmony_ci * All Rights Reserved. 5bf215546Sopenharmony_ci * 6bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 7bf215546Sopenharmony_ci * copy of this software and associated documentation files (the 8bf215546Sopenharmony_ci * "Software"), to deal in the Software without restriction, including 9bf215546Sopenharmony_ci * without limitation the rights to use, copy, modify, merge, publish, 10bf215546Sopenharmony_ci * distribute, sub license, and/or sell copies of the Software, and to 11bf215546Sopenharmony_ci * permit persons to whom the Software is furnished to do so, subject to 12bf215546Sopenharmony_ci * the following conditions: 13bf215546Sopenharmony_ci * 14bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the 15bf215546Sopenharmony_ci * next paragraph) shall be included in all copies or substantial portions 16bf215546Sopenharmony_ci * of the Software. 17bf215546Sopenharmony_ci * 18bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19bf215546Sopenharmony_ci * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20bf215546Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21bf215546Sopenharmony_ci * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 22bf215546Sopenharmony_ci * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23bf215546Sopenharmony_ci * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24bf215546Sopenharmony_ci * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25bf215546Sopenharmony_ci * 26bf215546Sopenharmony_ci **************************************************************************/ 27bf215546Sopenharmony_ci 28bf215546Sopenharmony_ci#ifndef CELSHADE_H 29bf215546Sopenharmony_ci#define CELSHADE_H 30bf215546Sopenharmony_ci 31bf215546Sopenharmony_cistatic const char celshade[] = "FRAG\n" 32bf215546Sopenharmony_ci "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" 33bf215546Sopenharmony_ci "DCL IN[0], GENERIC[0], PERSPECTIVE\n" 34bf215546Sopenharmony_ci "DCL OUT[0], COLOR\n" 35bf215546Sopenharmony_ci "DCL SAMP[0]\n" 36bf215546Sopenharmony_ci "DCL TEMP[0..4]\n" 37bf215546Sopenharmony_ci "IMM FLT32 { 0.2126, 0.7152, 0.0722, 4.0000}\n" 38bf215546Sopenharmony_ci "IMM FLT32 { 0.5000, 2.0000, 1.0000, -0.1250}\n" 39bf215546Sopenharmony_ci "IMM FLT32 { 0.2500, 0.1000, 0.1250, 3.0000}\n" 40bf215546Sopenharmony_ci " 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D\n" 41bf215546Sopenharmony_ci " 1: DP3 TEMP[1].x, TEMP[0].xyzz, IMM[0]\n" 42bf215546Sopenharmony_ci " 2: MUL TEMP[3].x, TEMP[1].xxxx, IMM[0].wwww\n" 43bf215546Sopenharmony_ci " 3: ROUND TEMP[2].x, TEMP[3].xxxx\n" 44bf215546Sopenharmony_ci " 4: MUL TEMP[3].x, TEMP[2].xxxx, IMM[2].xxxx\n" 45bf215546Sopenharmony_ci " 5: MOV TEMP[2].x, TEMP[3].xxxx\n" 46bf215546Sopenharmony_ci " 6: ADD TEMP[4].x, TEMP[1].xxxx, -TEMP[3].xxxx\n" 47bf215546Sopenharmony_ci " 7: SGT TEMP[1].w, TEMP[4].xxxx, IMM[2].yyyy\n" 48bf215546Sopenharmony_ci " 8: IF TEMP[1].wwww :19\n" 49bf215546Sopenharmony_ci " 9: ADD TEMP[4].y, TEMP[3].xxxx, IMM[2].yyyy\n" 50bf215546Sopenharmony_ci " 10: ADD TEMP[1].z, TEMP[1].xxxx, -TEMP[4].yyyy\n" 51bf215546Sopenharmony_ci " 11: ADD TEMP[1].y, TEMP[3].xxxx, IMM[2].zzzz\n" 52bf215546Sopenharmony_ci " 12: ADD TEMP[2].x, TEMP[1].yyyy, -TEMP[4].yyyy\n" 53bf215546Sopenharmony_ci " 13: RCP TEMP[4].y, TEMP[2].xxxx\n" 54bf215546Sopenharmony_ci " 14: MUL TEMP[2].x, TEMP[1].zzzz, TEMP[4].yyyy\n" 55bf215546Sopenharmony_ci " 15: MAD TEMP[1].y, -IMM[1].yyyy, TEMP[2].xxxx, IMM[2].wwww\n" 56bf215546Sopenharmony_ci " 16: MUL TEMP[1].z, TEMP[2].xxxx, TEMP[1].yyyy\n" 57bf215546Sopenharmony_ci " 17: MUL TEMP[1].y, TEMP[2].xxxx, TEMP[1].zzzz\n" 58bf215546Sopenharmony_ci " 18: MAD TEMP[2].x, TEMP[1].yyyy, IMM[2].zzzz, TEMP[3].xxxx\n" 59bf215546Sopenharmony_ci " 19: ENDIF\n" 60bf215546Sopenharmony_ci " 20: SLT TEMP[3].x, TEMP[4].xxxx, -IMM[2].yyyy\n" 61bf215546Sopenharmony_ci " 21: IF TEMP[3].xxxx :34\n" 62bf215546Sopenharmony_ci " 22: ADD TEMP[3].x, TEMP[2].xxxx, -IMM[2].zzzz\n" 63bf215546Sopenharmony_ci " 23: ADD TEMP[4].x, TEMP[1].xxxx, -TEMP[3].xxxx\n" 64bf215546Sopenharmony_ci " 24: ADD TEMP[1].x, TEMP[2].xxxx, -IMM[2].yyyy\n" 65bf215546Sopenharmony_ci " 25: ADD TEMP[4].y, TEMP[1].xxxx, -TEMP[3].xxxx\n" 66bf215546Sopenharmony_ci " 26: RCP TEMP[3].x, TEMP[4].yyyy\n" 67bf215546Sopenharmony_ci " 27: MUL TEMP[1].x, TEMP[4].xxxx, TEMP[3].xxxx\n" 68bf215546Sopenharmony_ci " 28: MAD TEMP[4].x, -IMM[1].yyyy, TEMP[1].xxxx, IMM[2].wwww\n" 69bf215546Sopenharmony_ci " 29: MUL TEMP[3].x, TEMP[1].xxxx, TEMP[4].xxxx\n" 70bf215546Sopenharmony_ci " 30: MUL TEMP[4].x, TEMP[1].xxxx, TEMP[3].xxxx\n" 71bf215546Sopenharmony_ci " 31: ADD TEMP[3].x, IMM[1].zzzz, -TEMP[4].xxxx\n" 72bf215546Sopenharmony_ci " 32: MAD TEMP[1].x, TEMP[3].xxxx, -IMM[2].zzzz, TEMP[2].xxxx\n" 73bf215546Sopenharmony_ci " 33: MOV TEMP[2].x, TEMP[1].xxxx\n" 74bf215546Sopenharmony_ci " 34: ENDIF\n" 75bf215546Sopenharmony_ci " 35: MAD TEMP[1].x, TEMP[2].xxxx, IMM[1].yyyy, IMM[2].yyyy\n" 76bf215546Sopenharmony_ci " 36: MUL OUT[0], TEMP[0], TEMP[1].xxxx\n" 77bf215546Sopenharmony_ci " 37: END\n"; 78bf215546Sopenharmony_ci 79bf215546Sopenharmony_ci#endif 80