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

dex 
Frequent poster
...

...

Status:Offline
Date registered: 11.09.2007
Post:14
Send Message
...   Created on 13.09.2007 - 22:20Jump to top Quote this post Report this post Edit Delete


This is a shader by VerGreeneyes who created it in less than a day after an idea I had.

The purpose of this shader is to change a specific color (light green) used for the Motion Tracker HUD in the game "Alien Trilogy" to blue (movie like).


Lengthy explanation:
This game is based solely on a movie franchise (it has not much else to it than simply showing off as many features as possible directly from the movie, using its licence) and the developers decide the one color you see CONSTANTLY in the game to be GREEN. Also every menu and text etc. is green. The whole "Aliens" movie seems to be filmed with a BLUEISH filter and the motion tracker has a blue display. As a fan of the movie I was searching for a way to finally change this and make this MOVIELIKE. Actually it is the next best "Alien" game after Aliens vs. Predator.
I posted this story and my idea about a shader to change only one specific color in these forums and in no time I had a working solution coded by VerGreeneyes from these forums. The shader can also be configured and adjusted.

This is the Motion Tracker as seen in the movie "Aliens" (notice it is BLUE):
http://gioco.net/aandp/MotionTracker2.jpg


This picture shows the tracker in the game "Alien Trilogy" (notice it is in ugly GREEN):


This is the tracker with VerGreeneyes shader:


But the Alien-acid as well as walls, warning signs etc. are still green. Also the Pulse Rifle has the right green parts:


So the shader changes effectively only the one ugly green colour for the HUD and menus. Other textures and movies with greenish elements are little to not affected. This is especially useful for the game "Alien Trilogy" but will work on other games as well of course.

fragment file (.slf):

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:
 
uniform sampler2D OGL2Texture;

const float HUE_ADJUSTMENT = 100.;
const float LOWER_LIMIT = 100.;
const float UPPER_LIMIT = 140.;

void main()
{
  vec4 C = texture2D(OGL2Texture,gl_TexCoord[0].xy);
  float V = max(C.r,max(C.g,C.b)),
        D = V - min(C.r,min(C.g,C.b)),
        H = 60. / D, S = bool(V) ? D / V : 0.;
  if(S){
    H = ((V == C.r) ? H * (C.g - C.b) : (V == C.g) ? 120. + H * (C.b - C.r) : 240. + H * (C.r - C.g));
    if(H >= LOWER_LIMIT && H < UPPER_LIMIT){
      H += HUE_ADJUSTMENT;
      H += 360. * (float(H < 0.) - float(H >= 360.));
      H /= 60.;
      D = floor(H);
      H = fract(H);
      if(mod(D,2.)){
        C.r = V * (1. - H * S);
        C.g = V * (1. - S);
      }else{
        C.r = V * (1. - S);
        C.g = V * (1. - (1. - H) * S);
      }
      if((D = floor(++D/2.)) == 1.) gl_FragColor.rgb = vec3(C.r,V,C.g);
      else if(D == 2.) gl_FragColor.rgb = vec3(C.g,C.r,V);
      else gl_FragColor.rgb = vec3(V,C.g,C.r);
    }else gl_FragColor = C;
    gl_FragColor.a = C.a;
  }else gl_FragColor = C;
}


vertex file (.slv):
Code:
1:
2:
3:
4:
5:
6:
 
void main()
{
  gl_Position = ftransform();
  gl_TexCoord[0] = gl_MultiTexCoord0;
}


Thank you very much VerGreeneyes for turning this crazy idea into reality

[Dieser Beitrag wurde am 13.09.2007 - 22:22 von dex aktualisiert]





Similarly threads:
Topics Created by Replies Boardname
Slayers Return: The Motion Piture "R" Lilith20 0 alice_seno
"Missing shader extensions" crash 9 pete_bernert
Mo 11.09. "Alien Invasion" Club Mirja 179 castrpg
Schließung der Foren "Alte Herren", "Damen", "Tennis", "Ski", etc. Neos 0 sce
"JUBA" - "SNIPER" -------- "US KILLER" ODER "MYTHOS" Phader 9 eidos
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:
alien piture
blank