Twigboy

Status:Offline Date registered: 30.12.2005 Post:3 Send Message | Created on 30.12.2005 - 03:12 |  |
Thsnk's rama,just not sure what to do with these fields of info. !!ARBvp1.0 OPTION ARB_position_invariant; MOV result.texcoord[ 0 ],vertex.texcoord[ 0 ]; END
gpuPeteOGL2.fp:
!!ARBfp1.0
PARAM One = {1.0, 1.0, 1.0, 0.0}; PARAM OneAndAhalf = {1.5, 1.5, 1.5, 0.0}; PARAM half = {0.5, 0.5, 0.5, 0.0}; PARAM darkIntensity = {0.1, 0.1, 0.1, 0.0}; PARAM brightIntensity = {0.7, 0.7, 0.7, 0.0}; PARAM shrink = {.99, .99, .99, 0}; PARAM r = {1.0, 0.0, 0.0, 0.0}; PARAM g = {0.0, 1.0, 0.0, 0.0}; PARAM b = {0.0, 0.0, 1.0, 0.0};
TEMP pixel; TEMP overallColor; TEMP brightScale; TEMP brightColor; TEMP darkScale; TEMP darkColor; TEMP colorTemp;
# Read my pixel color & convert it to (0,1) TEX pixel, fragment.texcoord[0], texture[0], 2D; SUB pixel, pixel, half; MAD pixel, pixel, shrink, half;
# Compute bright color DP3 colorTemp, pixel, r; MOV brightScale, colorTemp; DP3 colorTemp, pixel, g; MAX brightScale, brightScale, colorTemp; DP3 colorTemp, pixel, b; MAX brightScale, brightScale, colorTemp; RCP brightScale, brightScale.x; MUL brightScale, brightScale, brightIntensity; MUL brightColor, brightScale, pixel;
# Compute dark color DP3 colorTemp, pixel, r; MOV darkScale, colorTemp; DP3 colorTemp, pixel, g; MAX darkScale, darkScale, colorTemp; DP3 colorTemp, pixel, b; MAX darkScale, darkScale, colorTemp; RCP darkScale, darkScale.x; MUL darkScale, darkScale, darkIntensity; MUL darkColor, darkScale, pixel;
# Choose bright or dark DP3 overallColor, pixel, One; SUB overallColor, overallColor, OneAndAhalf; CMP result.color, overallColor, darkColor, brightColor;
Is there a program or something I need to use to compile this formula?

|
rama  Strong supporter
 

Status:Offline Date registered: 18.11.2005 Post:43 Send Message | Created on 30.12.2005 - 03:19 |  |
Well, you need to create those 2 files yourself. First you create a new textfile and insert this:
!!ARBvp1.0 OPTION ARB_position_invariant; MOV result.texcoord[ 0 ],vertex.texcoord[ 0 ]; END
Then you save that textfile as "gpuPeteOGL2.vp".
In the second textfile you insert this:
!!ARBfp1.0
PARAM One = {1.0, 1.0, 1.0, 0.0}; PARAM OneAndAhalf = {1.5, 1.5, 1.5, 0.0}; PARAM half = {0.5, 0.5, 0.5, 0.0}; PARAM darkIntensity = {0.1, 0.1, 0.1, 0.0}; PARAM brightIntensity = {0.7, 0.7, 0.7, 0.0}; PARAM shrink = {.99, .99, .99, 0}; PARAM r = {1.0, 0.0, 0.0, 0.0}; PARAM g = {0.0, 1.0, 0.0, 0.0}; PARAM b = {0.0, 0.0, 1.0, 0.0};
TEMP pixel; TEMP overallColor; TEMP brightScale; TEMP brightColor; TEMP darkScale; TEMP darkColor; TEMP colorTemp;
# Read my pixel color & convert it to (0,1) TEX pixel, fragment.texcoord[0], texture[0], 2D; SUB pixel, pixel, half; MAD pixel, pixel, shrink, half;
# Compute bright color DP3 colorTemp, pixel, r; MOV brightScale, colorTemp; DP3 colorTemp, pixel, g; MAX brightScale, brightScale, colorTemp; DP3 colorTemp, pixel, b; MAX brightScale, brightScale, colorTemp; RCP brightScale, brightScale.x; MUL brightScale, brightScale, brightIntensity; MUL brightColor, brightScale, pixel;
# Compute dark color DP3 colorTemp, pixel, r; MOV darkScale, colorTemp; DP3 colorTemp, pixel, g; MAX darkScale, darkScale, colorTemp; DP3 colorTemp, pixel, b; MAX darkScale, darkScale, colorTemp; RCP darkScale, darkScale.x; MUL darkScale, darkScale, darkIntensity; MUL darkColor, darkScale, pixel;
# Choose bright or dark DP3 overallColor, pixel, One; SUB overallColor, overallColor, OneAndAhalf; CMP result.color, overallColor, darkColor, brightColor;
END
This file you need to save as "gpuPeteOGL2.fp". Put the 2 files in a directory and set the plugin to this directory. I hope that helps ^^
|