Pete´s Messageboard... No ISO/BIOS requests!

Homepage Members Register Login Search Old board


Neuer Thread ...


AuthorTopics » Book an abo for this threadClose Thread Move Thread Fix the thread Print view Delete this thread

guest ...
Real addict
.........

...

Status:Offline
Date registered: 30.07.2004
Post:856
Send Message
...   Created on 05.08.2009 - 14:43Jump to top Quote this post Report this post Edit Delete


The original files date from 3.2.2005.
Here, a repost.

vertex file:

Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
 

uniform vec4 OGL2Param;
uniform vec4 OGL2Size;
void main()
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_TexCoord[1] = gl_TexCoord[0];
gl_TexCoord[2] = gl_TexCoord[0];
gl_TexCoord[3] = gl_TexCoord[0];
gl_TexCoord[0].y-=OGL2Param.y; 
gl_TexCoord[1].x+=OGL2Param.x; 
gl_TexCoord[2].y+=OGL2Param.y; 
gl_TexCoord[3].x-=OGL2Param.x; 

}


fragment file:

Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
 

// MultiPowerSE shader 
// by guest(r)
// one can change the type the power and interpolation functions 
// in the body to achieve various processings or/and effects
// you can choose between allmost too many interpolation methodes
// and three different edge processing styles (= *muchos* different processing settings) 
// should work with all Dx.9.0 cards

uniform vec4 OGL2Param;
uniform vec4 OGL2Size;
uniform sampler2D OGL2Texture;


// ******************** power functions ***********************

// they describe how the diference should be interpolated: linear, quadratic...

vec3 logg2(vec3 x)
{ return log2(vec3(1.0,1.0,1.0)+abs(x)); }

vec3 lin1(vec3 x) 
{return abs(x)*0.5; }

vec3 lin2(vec3 x) 
{return abs(x)*0.25; } 

vec3 sqr1(vec3 x) 
{return x*x; }

vec3 sqr2(vec3 x) 
{return 2.0*x*x; }

vec3 cube1(vec3 x) 
{return abs(x*x*x); }

vec3 cube2(vec3 x) 
{return 2.0*abs(x*x*x); }

vec3 quad1(vec3 x) 
{x*=x; return x*x; }

vec3 quad2(vec3 x) 
{x*=x; return 2.0*x*x; }

vec3 zero(vec3 x)
{return vec3(0.0,0.0,0.0);} // fastest

/********************* Main functions *************************/

vec3 minplus(vec3 x, vec3 y, vec3 z)
{ return vec3(min(x.x,y.x),min(x.y,y.y),min(x.z,y.z))+z; }

vec3 maxminus(vec3 x, vec3 y, vec3 z)
{ return vec3(max(x.x,y.x),max(x.y,y.y),max(x.z,y.z))-z; }

vec3 minminus(vec3 x, vec3 y, vec3 z)
{ return vec3(min(x.x,y.x),min(x.y,y.y),min(x.z,y.z))-z; }

vec3 maxplus(vec3 x, vec3 y, vec3 z)
{ return vec3(max(x.x,y.x),max(x.y,y.y),max(x.z,y.z))+z; }

vec3 mid_plus(vec3 x, vec3 y, vec3 z)
{ return 0.5*(x + y + z); }

vec3 mid_minus(vec3 x, vec3 y, vec3 z)
{ return 0.5*(x + y - z); }

/********************* other functions ***********************/

float len3(vec3 x)
{ return abs(x.x)+abs(x.y)+abs(x.z); }


// ***********************************************************

void main()
{
vec4 t1,t2,c1,c2;
vec4 uy = texture2DProj(OGL2Texture, gl_TexCoord[0]);
vec4 lx = texture2DProj(OGL2Texture, gl_TexCoord[3]);
vec4 rx = texture2DProj(OGL2Texture, gl_TexCoord[1]);
vec4 dy = texture2DProj(OGL2Texture, gl_TexCoord[2]);
t1 = lx - rx; c1.w = 0.0; c2.w=0.0; // precaution
t2 = uy - dy; 

// ********************** E D G E S ************************
// uncomment one of theese line to gain the edge-effect

// Edged version - may look good with less-pixelated 3D games
// c1.w = len3(t1.xyz);c2.w = len3(t2.xyz); c1.w = 0.45*c1.w; c2.w = 0.45*c2.w;

// EdgedSE version - dark edges when strong contrast 
// c1.w = len3(t1.xyz);c2.w = len3(t2.xyz); c1.w*= 0.175*c1.w; c2.w*= 0.175*c2.w;


// you can use: 
// *** sqrt | logg2 | lin1 | lin2 | sqr1 | sqr2 | cube1 | cube2 | quad1 | quad2 | zero ***
// function to calculate the additive value
// the shader was tested with one type of power function at the time.

t1.xyz = sqr1(t1.xyz);
t2.xyz = sqr1(t2.xyz);


// here you can select between interpolation starting-points
// *** minminus || minplus || maxminus || maxplus || mid_plus || mid_minus ***
// just rename the both functions below (and leave the parameters be)

c1.xyz = minminus(lx.xyz,rx.xyz,t1.xyz);
c2.xyz = minminus(uy.xyz,dy.xyz,t2.xyz);

c1.xyz = 0.5*(1.0-c1.w-c2.w)*(c1.xyz+c2.xyz);
gl_FragColor = c1;
}


[Dieser Beitrag wurde am 05.08.2009 - 17:47 von guest aktualisiert]




KrossX 
Strong supporter
......

...

Status:Offline
Date registered: 16.06.2008
Post:91
Send Message
...   Created on 15.08.2009 - 09:26Jump to top Quote this post Report this post Edit Delete


Wow, looks overwhelming. O_O

I think it deserves its own GUI. XD





Signature

guest ...
Real addict
.........

...

Status:Offline
Date registered: 30.07.2004
Post:856
Send Message
...   Created on 17.08.2009 - 11:21Jump to top Quote this post Report this post Edit Delete


It had it's own guide in it's time. And it was a time folks didn't expect too much from buggy PS2 shaders. :P





Similarly threads:
Topics Created by Replies Boardname
Natural Vision Shader + AA Shader v2.o = Best Shader for 2d !! zaykho 10 pete_bernert
What's a Shader Near 1 pete_bernert
MMJ's 4-in-1 Shader MegaManJuno 10 pete_bernert
Shader Aquamarin 0 schaddi
4-in-1 Shader v1.10 MegaManJuno 3 pete_bernert
Neuer Thread ...





Masthead

This forum is a free service of razyboard.com powered by:
Geizkragen Price Comparison. Top product in the price comparison: Krups Nespresso Essenza (XN2001)
Do you want a free forum in less than two minutes? Then click here!



Verwandte Suchbegriffe:
multipower.se
blank