Author | Topics » Book an abo for this thread |  |
KrossX Real addict
  

Status:Offline Date registered: 16.06.2008 Post:122 Send Message | Created on 18.06.2009 - 05:07 |  |
New pack? T_T *tears*
Signature

 |
guest  Real addict
  

Status:Offline Date registered: 30.07.2004 Post:854 Send Message | Created on 18.06.2009 - 19:47 |  |
I find this shader below to be one of the used sort but it wasn't published yet in it's current form...
Vertex 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: | | |
| /*
| Copyright (C) 2009 guest(r) - guest.r@gmail.com
| */
|
| uniform vec4 OGL2Param;
| uniform vec4 OGL2Size;
|
| void main()
| {
| float x = (OGL2Size.x/2048.0)*OGL2Param.x;
| float y = (OGL2Size.y/1024.0)*OGL2Param.y;
| vec2 dg1 = vec2( x,y); vec2 dg2 = vec2(-x,y);
| vec2 sd1 = dg1*0.5; vec2 sd2 = dg2*0.5;
| vec2 ddx = vec2(x,0.0); vec2 ddy = vec2(0.0,y);
|
| gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
| gl_TexCoord[0] = gl_MultiTexCoord0;
| gl_TexCoord[1].xy = gl_TexCoord[0].xy - sd1;
| gl_TexCoord[2].xy = gl_TexCoord[0].xy - sd2;
| gl_TexCoord[3].xy = gl_TexCoord[0].xy + sd1;
| gl_TexCoord[4].xy = gl_TexCoord[0].xy + sd2;
| gl_TexCoord[5].xy = gl_TexCoord[0].xy - dg1;
| gl_TexCoord[6].xy = gl_TexCoord[0].xy + dg1;
| gl_TexCoord[5].zw = gl_TexCoord[0].xy - dg2;
| gl_TexCoord[6].zw = gl_TexCoord[0].xy + dg2;
| gl_TexCoord[1].zw = gl_TexCoord[0].xy - ddy;
| gl_TexCoord[2].zw = gl_TexCoord[0].xy + ddx;
| gl_TexCoord[3].zw = gl_TexCoord[0].xy + ddy;
| gl_TexCoord[4].zw = gl_TexCoord[0].xy - ddx;
| }
| | |
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: | | |
| /*
| The 4xGLSoft shader - Bloom II
|
| Copyright (C) 2009 guest(r) - guest.r@gmail.com
| */
|
|
| uniform sampler2D OGL2Texture;
|
| float hd(float x)
| {
| float y = x*1.1547-1.0;
| float z = x*0.8660254;
| y = (sin(y*1.5707)+1.0)*0.866025;
| return ((1.0-z)*x+z*y);
| }
|
| void main()
| {
| vec3 c11 = texture2D(OGL2Texture, gl_TexCoord[0].xy).xyz;
| vec3 s00 = texture2D(OGL2Texture, gl_TexCoord[1].xy).xyz;
| vec3 s20 = texture2D(OGL2Texture, gl_TexCoord[2].xy).xyz;
| vec3 s22 = texture2D(OGL2Texture, gl_TexCoord[3].xy).xyz;
| vec3 s02 = texture2D(OGL2Texture, gl_TexCoord[4].xy).xyz;
| vec3 c00 = texture2D(OGL2Texture, gl_TexCoord[5].xy).xyz;
| vec3 c22 = texture2D(OGL2Texture, gl_TexCoord[6].xy).xyz;
| vec3 c20 = texture2D(OGL2Texture, gl_TexCoord[5].zw).xyz;
| vec3 c02 = texture2D(OGL2Texture, gl_TexCoord[6].zw).xyz;
| vec3 c01 = texture2D(OGL2Texture, gl_TexCoord[1].zw).xyz;
| vec3 c21 = texture2D(OGL2Texture, gl_TexCoord[2].zw).xyz;
| vec3 c10 = texture2D(OGL2Texture, gl_TexCoord[3].zw).xyz;
| vec3 c12 = texture2D(OGL2Texture, gl_TexCoord[4].zw).xyz;
| vec3 dt = vec3(1.0,1.0,1.0);
|
| float d1=dot(abs(c00-c22),dt)+0.001;
| float d2=dot(abs(c20-c02),dt)+0.001;
| float hl=dot(abs(c01-c21),dt)+0.001;
| float vl=dot(abs(c10-c12),dt)+0.001;
| float m1=dot(abs(s00-s22),dt)+0.001;
| float m2=dot(abs(s02-s20),dt)+0.001;
|
| vec3 t1=(hl*(c10+c12)+vl*(c01+c21)+(hl+vl)*c11)/(3.0*(hl+vl));
| vec3 t2=(d1*(c20+c02)+d2*(c00+c22)+(d1+d2)*c11)/(3.0*(d1+d2));
|
| c11 =.25*(t1+t2+(m2*(s00+s22)+m1*(s02+s20))/(m1+m2));
|
| d1 = length(c11);
| c11= vec3(pow(c11,vec3(1.2)));
|
| gl_FragColor.xyz=hd(d1)*normalize(c11);
| }
| | |
[Dieser Beitrag wurde am 04.05.2012 - 14:25 von guest aktualisiert]
|
KrossX Real addict
  

Status:Offline Date registered: 16.06.2008 Post:122 Send Message | Created on 19.06.2009 - 13:58 |  |
OMG! It's guest! *faints* XD
@SuheBator: Nice and subtle, for all-3D games. Text and other sprites tend to look pretty bad.
@guest: I like it! Text looks quite nice to me with just the first level of it, with more it just gets too blurry. And the bloom, I always like the bloom. XD
I like it more than AA - Daisy 2.o, the one I use the most. Mostly for the way the text looks at the first level.
Signature

 |
jinjin12

Status:Offline Date registered: 07.10.2009 Post:5 Send Message | Created on 07.10.2009 - 19:31 |  |
what is the dos box for?
|
KrossX Real addict
  

Status:Offline Date registered: 16.06.2008 Post:122 Send Message | Created on 08.10.2009 - 01:42 |  |
Google is your friend. => DOSBox Main Page.
Signature

 |
guest  Real addict
  

Status:Offline Date registered: 30.07.2004 Post:854 Send Message | Created on 19.05.2010 - 20:27 |  |
New shader pack soon. Almost there.
|
KrossX Real addict
  

Status:Offline Date registered: 16.06.2008 Post:122 Send Message | Created on 20.05.2010 - 10:55 |  |
Teaser... ¬_¬
Signature

 |
Kigaruna

Status:Offline Date registered: 19.07.2010 Post:3 Send Message | Created on 19.07.2010 - 18:48 |  |
Sorry for asking, but does new shader pack already there somewhere or its still coming? If the first, I will be grateful for some link. Thanks.
|
Z Real addict
  

Status:Offline Date registered: 03.08.2005 Post:103 Send Message | Created on 21.11.2010 - 01:43 |  |
"4xGLSoft shader - Bloom II" does not work for me.
Screen just stays black when starting emu.
Doesn't even give a debug-error code.
|
KrossX Real addict
  

Status:Offline Date registered: 16.06.2008 Post:122 Send Message | Created on 23.11.2010 - 05:25 |  |
What's your videocard ? Because it's working fine here.
Other than that, make sure the content was copied correctly without missing any closing bracket or something.
You could also try adding an extra line to have a blank end of file.
Signature

 |