Hrer is the first post
And this is the second oneEl Ahly is international Club now.
What a wonderful work that you have done!.
Congratulations this wonderful level
Here is an other demo , it is a Credits demo.Thanks for your good words
Is your name Omar or I am incorrect?
Long life for El Ahly Club
Demo feature
=========
1- dark Background Image
2- vertical scrolling text
3- playing movie masked by the scrolling text
4- gradually fading in the lowest scrolling text and fading out the upper scrolling text
Idea of demo
=========
I have rendered a scrolling test to texture , and created an alpha mask sprite so the alpha value is 1.0 in the middle of sprite and it gradually decrease to 0.0 in the upper and lower sprite edge, then I have used the next shader program to make the effect.
Here is the alpha mask sprite
Code: Select all
AlphaMaskSprite = ML.CreateStaticSprite(1,255);
ML.StartDrawingToSprite(AlphaMaskSprite);
ML.ClearDrawingArea(0);
width = ML.GetDrawingWidth();
height= ML.GetDrawingHeight();
for(int h=0; h<height; ++h)
{
ML.WriteAlphaChannel(0,h,(h>127)?255-2*h:2*h);
}
ML.StopDrawingToSprite(AlphaMaskSprite);
Code: Select all
ML.EditPixelProgram(HLSLProgram);
ML.AddToProgram("struct PS_OUTPUT ");
ML.AddToProgram("{ ");
ML.AddToProgram(" float4 Diffuse : COLOR0; ");
ML.AddToProgram("}; ");
ML.AddToProgram("sampler2D tex0; ");
ML.AddToProgram("sampler2D tex1; ");
ML.AddToProgram("sampler2D tex2; ");
ML.AddToProgram("PS_OUTPUT main( float2 TexCoord : TEXCOORD0) ");
ML.AddToProgram("{ ");
ML.AddToProgram(" PS_OUTPUT Output; ");
ML.AddToProgram(" float4 col0 = tex2D( tex0, TexCoord); ");
ML.AddToProgram(" float4 col1 = tex2D( tex1, TexCoord); ");
ML.AddToProgram(" float4 col2 = tex2D( tex2, TexCoord); ");
ML.AddToProgram(" Output.Diffuse = float4(col0.rgb,col1.a*col2.a); ");
ML.AddToProgram(" return Output; ");
ML.AddToProgram("} ");
ML.CompilePixelProgram(HLSLProgram,"main");
http://bcxdx.spoilerspace.com/video/Credir.wmv
Here is a screen shots of my demo
Edited:
see the full source code here
http://www.freewebs.com/ogremagic/Credits.html