uniform vec4 fvAmbient;
uniform vec4 fvSpecular;
uniform vec4 fvDiffuse;
uniform float fSpecularPower;

uniform sampler2D baseMap;
uniform sampler2D bumpMap;

varying vec2 Texcoord;
varying vec3 ViewDirection;
varying vec3 LightDirection;

void main( void )
{
  vec3  fvLightDirection = normalize( LightDirection );
  vec3  fvNormal         = normalize( ( texture2D( bumpMap, Texcoord ).xyz * 2.0 ) - 1.0 );
  float fNDotL           = dot( fvNormal, fvLightDirection );

  vec3  fvReflection     = normalize( ( ( 2.0 * fvNormal ) * fNDotL ) - fvLightDirection );
  vec3  fvViewDirection  = normalize( ViewDirection );
  float fRDotV           = max( 0.0, dot( fvReflection, fvViewDirection ) );

  vec4  fvBaseColor      = texture2D( baseMap, Texcoord );

  vec4  fvTotalAmbient   = fvAmbient * fvBaseColor;
  vec4  fvTotalDiffuse   = fvDiffuse * fNDotL * fvBaseColor;
  vec4  fvTotalSpecular  = fvSpecular * ( pow( fRDotV, fSpecularPower ) );

  gl_FragColor = ( fvTotalAmbient + fvTotalDiffuse + fvTotalSpecular );

}uniform vec3 fvLightPosition;
uniform vec3 fvEyePosition;

varying vec2 Texcoord;
varying vec3 ViewDirection;
varying vec3 LightDirection;

attribute vec3 rm_Binormal;
attribute vec3 rm_Tangent;

void main( void )
{
  gl_Position = ftransform();
  Texcoord    = gl_MultiTexCoord0.xy;

  vec4 fvObjectPosition = gl_ModelViewMatrix * gl_Vertex;

  vec3 fvViewDirection  = fvEyePosition - fvObjectPosition.xyz;
  vec3 fvLightDirection = fvLightPosition - fvObjectPosition.xyz;

  vec3 fvNormal         = gl_NormalMatrix * gl_Normal;
  vec3 fvBinormal       = gl_NormalMatrix * rm_Binormal;
  vec3 fvTangent        = gl_NormalMatrix * rm_Tangent;

  ViewDirection.x  = dot( fvTangent, fvViewDirection );
  ViewDirection.y  = dot( fvBinormal, fvViewDirection );
  ViewDirection.z  = dot( fvNormal, fvViewDirection );

  LightDirection.x  = dot( fvTangent, fvLightDirection.xyz );
  LightDirection.y  = dot( fvBinormal, fvLightDirection.xyz );
  LightDirection.z  = dot( fvNormal, fvLightDirection.xyz );

}uniform vec4 fvAmbient;
uniform vec4 fvSpecular;
uniform vec4 fvDiffuse;
uniform float fSpecularPower;

uniform sampler2D baseMap;

varying vec2 Texcoord;
varying vec3 ViewDirection;
varying vec3 LightDirection;
varying vec3 Normal;

void main( void )
{
  vec3  fvLightDirection = normalize( LightDirection );
  vec3  fvNormal         = normalize( Normal );
  float fNDotL           = dot( fvNormal, fvLightDirection );

  vec3  fvReflection     = normalize( ( ( 2.0 * fvNormal ) * fNDotL ) - fvLightDirection );
  vec3  fvViewDirection  = normalize( ViewDirection );
  float fRDotV           = max( 0.0, dot( fvReflection, fvViewDirection ) );

  vec4  fvBaseColor      = texture2D( baseMap, Texcoord );

  vec4  fvTotalAmbient   = fvAmbient * fvBaseColor;
  vec4  fvTotalDiffuse   = fvDiffuse * fNDotL * fvBaseColor;
  vec4  fvTotalSpecular  = fvSpecular * ( pow( fRDotV, fSpecularPower ) );

  gl_FragColor = ( fvTotalAmbient + fvTotalDiffuse + fvTotalSpecular );

}uniform vec3 fvLightPosition;
uniform vec3 fvEyePosition;

uniform float control;
uniform float value;
uniform float power;
uniform float fTime0_X;

varying vec2 Texcoord;
varying vec3 ViewDirection;
varying vec3 LightDirection;
varying vec3 Normal;

void main( void )
{

  Texcoord    = gl_MultiTexCoord0.xy;

  float d = sqrt(gl_Vertex.x*gl_Vertex.x+gl_Vertex.y*gl_Vertex.y+gl_Vertex.z*gl_Vertex.z);

  d = d*control;

    d = pow(d, power);

  float v = sin(fTime0_X-d*d*value);

  vec4 fvObjectPosition = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.x*cos(v)+gl_Vertex.y*sin(v), gl_Vertex.y*cos(v)-gl_Vertex.x*sin(v), gl_Vertex.z, 1);
 // gl_Position = fvObjectPosition;//  vec4(ftransform().x*sin(fTime0_X),-ftransform().y*cos(fTime0_X),ftransform().z,ftransform().w);

  ViewDirection  = fvEyePosition - fvObjectPosition.xyz;
  LightDirection = fvLightPosition - fvObjectPosition.xyz;
  Normal         = gl_NormalMatrix * gl_Normal;

gl_Position = fvObjectPosition + vec4(Normal,0.0)*(1.0-d);

} float kernel[9]; uniform sampler2D colorMap; uniform float width; uniform float height; uniform float intensity; float step_w = 1.0/width; float step_h = 1.0/height; vec2 offset[9];                                             void main(void) {  if (gl_TexCoord[0].x < 0.005 || gl_TexCoord[0].y < 0.005 || gl_TexCoord[0].x > 0.995 || gl_TexCoord[0].y > 0.995)    discard;     vec4 sum = vec4(0.0);     offset[0] = vec2(-step_w, -step_h);   offset[1] = vec2(0.0, -step_h);   offset[2] = vec2(step_w, -step_h);     offset[3] = vec2(-step_w, 0.0);   offset[4] = vec2(0.0, 0.0);   offset[5] = vec2(step_w, 0.0);     offset[6] = vec2(-step_w, step_h);   offset[7] = vec2(0.0, step_h);   offset[8] = vec2(step_w, step_h);     kernel[0] = 0.0;   kernel[1] = 1.0*intensity;   kernel[2] = 0.0;   kernel[3] = 1.0*intensity;   kernel[4] = -4.0*intensity;   kernel[5] = 1.0*intensity;   kernel[6] = 0.0;   kernel[7] = 1.0*intensity;   kernel[8] = 0.0;         for( int i=0; i<9; i++ )   {             vec4 tmp = texture2D(colorMap, gl_TexCoord[0].st + offset[i]);         sum += tmp*kernel[i];   }   gl_FragColor = sum; }void main()
{
       gl_TexCoord[0] = gl_MultiTexCoord0;
       gl_Position = ftransform();
}
uniform sampler2D Source;
uniform sampler2D Texture0;
uniform float value;
uniform float contribution;
uniform vec2 offset;
uniform float speed;
uniform vec4 adjust;

uniform float fTime0_X;

varying vec2 texCoord;

void main(void)
  {
  vec2 noise = texture2D( Texture0,texCoord+fTime0_X*0.01*speed).xy;
  noise += texture2D( Texture0,texCoord*vec2(-2.0,2.0)+fTime0_X*0.02*speed).xy;
  noise += texture2D( Texture0,texCoord*vec2(0.5,-0.5)+fTime0_X*0.04*speed).xy;

  noise = (noise-offset)*0.01*value;

  vec4 col = texture2D( Source,texCoord+noise);
  gl_FragColor = col*texture2D( Source,texCoord)*contribution*adjust;
  // gl_FragColor = texture2D( Texture0,texCoord);
}varying vec2 texCoord;

void main(void) {

 gl_Position    = ftransform();
 // gl_Position = gl_Vertex-vec4(0.5,0.5,0.5,0.5);
 texCoord = gl_MultiTexCoord0.xy;
 //texCoord = gl_MultiTexCoord0.xy+vec2(0.5,0.5);

}

/* varying vec2 texCoord;



void main(void)

{

gl_Position = ftransform();

texCoord = gl_MultiTexCoord0.xy*scale;

} */    varying vec4 diffuse,ambient;
       varying vec3 normal,halfVector;
       uniform vec3 lightDir;

       void main()
       {
               vec3 n,halfV;
               float NdotL,NdotHV;

               /* The ambient term will always be present */
               vec4 color = ambient;

               /* a fragment shader can't write a varying variable, hence we need
               a new variable to store the normalized interpolated normal */
               n = normalize(normal);

               /* compute the dot product between normal and ldir */
               NdotL = max(dot(n,lightDir),0.0);

               if (NdotL > 0.0) {
                       color += diffuse * NdotL;
                       halfV = normalize(halfVector);
                       NdotHV = max(dot(n,halfV),0.0);
                       color += gl_FrontMaterial.specular *
                                       gl_LightSource[0].specular *
                                       pow(NdotHV, gl_FrontMaterial.shininess);
               }

               gl_FragColor = color;
}       varying vec4 diffuse,ambient;
       varying vec3 normal,halfVector;
       uniform vec3 lightDir;

       void main()
       {
               vec3 v;

               /* first transform the normal into eye space and
               normalize the result */
               normal = normalize(gl_NormalMatrix * gl_Normal);

               /* now normalize the light's direction. Note that
               according to the OpenGL specification, the light
               is stored in eye space. Also since we're talking about
               a directional light, the position field is actually direction */
               //lightDir = normalize(lightDir);//vec3(gl_LightSource[0].position));
               v = normalize(lightDir);

               /* Normalize the halfVector to pass it to the fragment shader */
               halfVector = normalize(gl_LightSource[0].halfVector.xyz);

               /* Compute the diffuse, ambient and globalAmbient terms */
               diffuse = gl_FrontMaterial.diffuse * gl_LightSource[0].diffuse;
               ambient = gl_FrontMaterial.ambient * gl_LightSource[0].ambient;
               ambient += gl_LightModel.ambient * gl_FrontMaterial.ambient;

               gl_Position = ftransform();
       } Spontz's
   | |           | |       | |             (_)
 __| | ___  _ __ | |_    __| | ___  ___ ___ ___   _____   _ __ ___   ___
/ _` |/ _ \| '_ \| __|  / _` |/ _ \/ __/ _ \ \ \ / / _ \ | '_ ` _ \ / _ \
| (_| | (_) | | | | |_  | (_| |  __/ (_|  __/ |\ V /  __/ | | | | | |  __/
\__,_|\___/|_| |_|\__|  \__,_|\___|\___\___|_| \_/ \___| |_| |_| |_|\___|

Hi fellow scener!

Finishing this demo has been a hell. Planned to be presented in the past
euskal party  (a year ago), and  then in the breakpoint, it was finished
in the partyplace, as usual :)

This demo  was heavily  influenced by conversations with Navis from ASD,
when he was in Bilbao  (I am talking about year 2008)  and iq from RGBA.
You can notice this in the transitions  from one scene to the  next one,
fact that we have tried to smooth as much as possible.

The people that have seen the  demo preview told me that the  city scene
used a rendering mode  too similar to the one  used by Navis in his last
production "Rupture". In fact the shader  used in the demo was available
in the demo editor since our "death of the death" demo, presented in the
breakpoint in 2008, and was awaiting for a  massive destruction scene as
the one contained in this prod.

This time, the particle engine  was heavily improved, adding support for
3D objects as particles.  The rendering pipeline has been also reworked,
allowing to display more and more simultaneous polygons.  There are also
new effects and sections available  in the demoeditor and two new  types
of cameras, allowing realtime modifications of pre-recorded paths.

Notice  that if you are interested  in this demo generation tool,  it is
possible to get it through the spontz web page: http://www.spontz.org

I remember myself  spending a lot  of time imagining  how to put all the
scenes together. The ideas appeared randomly at different moments... for
example,  the mandalas in the middle  came after  watching a film in the
cinema, the city scene appeared when watching E.T. again, and some other
came just surfing the internet for inspiration.

Yes, I know that there are too many pics of me in the demo.  It's not my
fault, since the original idea was to show us inside  creating different
weird effects.  I only could get a pic for  isaac2 and other for xphere,
and both of them are shown at the begining  of the demo. Khrome and Amon
never sent me a picture. Sooo i picked up the camera and filled the rest
of the scenes with myself :)

Anyway, too late to continue writing,  it's time to sleep a bit,  I hope
you to enjoy  this demo,  it will be the last  one for a long  period of
time =)

                                                       merlucin
________________________________________________________________________
don't deceive me
presented at the euskal party, July 2009 in Bilbao (Spain)

Consejos de merlucin:
un recto sano es un recto feliz, ¡cuida tu recto y él cuidará de ti!