home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 September / PCWorld_2003-09_cd.bin / Software / TemaCD / ankazis / ankazis.CAB / common.shader < prev    next >
Text File  |  2001-01-03  |  3KB  |  130 lines

  1. //#####################################################################//
  2. //                     TrueVision8 Shader Script                       //
  3. //#####################################################################//
  4. //                                                                     //
  5. //  Common Shader for Flames                           //
  6. //                                       //
  7. // You have to define the used textures before creating the Shader     //
  8. // At the left, the texture filename (can be in a PAK file)            //
  9. // At the right, the texture name that will be used in the engine      //
  10. //                                       //    
  11. //#####################################################################//
  12.  
  13. TEXTURES 17
  14. flame1.jpg > Flame1
  15. flame2.jpg > Flame2
  16. flame3.jpg > Flame3
  17. flame4.jpg > Flame4
  18. flame5.jpg > Flame5
  19. flame6.jpg > Flame6
  20. flame7.jpg > Flame7
  21. flame8.jpg > Flame8
  22. expl1.jpg > Explosion1
  23. expl2.jpg > Explosion2
  24. expl3.jpg > Explosion3
  25. expl4.jpg > Explosion4
  26. expl5.jpg > Explosion5
  27. expl6.jpg > Explosion6
  28. expl7.jpg > Explosion7
  29. expl8.jpg > Explosion8
  30. flameball.jpg > FlameBall
  31. glass.jpg > Glass
  32.  
  33.  
  34. //#####################################
  35. // Shaders Declarations. 
  36. //#####################################
  37.  
  38. SHADER Flame1
  39. {
  40. //  Shader can contains several layers
  41.    Layer map1
  42.    {    
  43.  
  44.        //
  45.        // Texture Animation :
  46.        // Syntax : anim [FramePerSecond] [Tex1] [Tex2] ... [TexN] [0]
  47.        //
  48.  
  49.          anim 10 Flame1 Flame2 Flame3 Flame4 Flame5 Flame6 Flame7 Flame8 [0]
  50.         
  51.        // Blender functions
  52.        // Two ways : Blend [NO|ADD|ALPHA|COLOR|LIGHTMAP]
  53.        //            BlendFunc [ZERO|ONE|ALPHA|INVALPHA|COLOR|INVCOLOR|DESTCOLOR] [ONE|ZERO|SRCCOLOR|ALPHA|INVALPHA|COLOR|INVCOLOR]
  54.        //                             src blend                                    dest blend
  55.       
  56.      blendFunc ONE ONE
  57.  
  58.     }
  59.  
  60.     Layer map2
  61.     {
  62.        // Other Tex Animation
  63.        // for a blur effect
  64.     
  65.          anim 10 Flame2 Flame3 Flame4 Flame5 Flame6 Flame7 Flame8 Flame1 [0]
  66.  
  67.          blendFunc ONE ONE
  68.     }
  69.  
  70.     Layer map3
  71.     {
  72.        // Finally blend another flame ball
  73.  
  74.         map FlameBall
  75.         blendFunc ONE ONE
  76.     }
  77.  
  78.  
  79. }
  80.  
  81. //
  82. // Explosion effect
  83. //
  84. SHADER Explosion
  85. {
  86.    Layer map1
  87.    {    
  88.  
  89.        //
  90.        // Texture Animation :
  91.        // Syntax : anim [FramePerSecond] [Tex1] [Tex2] ... [TexN] [0]
  92.        //
  93.  
  94.          anim 10 Explosion1 Explosion2 Explosion3 Explosion4 Explosion5 Explosion6 Explosion7 Explosion8 [0]
  95.      blendFunc ONE ONE
  96.          depthFunc NOWRITE
  97.  
  98.     }
  99. }   
  100.  
  101.  
  102. // ###########################################
  103. //   Common Surfaces
  104. // ###########################################
  105.  
  106. SHADER Glass
  107. {
  108.    $nolightmap
  109.    Layer Glass1
  110.    {
  111.        map Glass
  112.        alpha 0.5
  113.        blendFunc ALPHA INVALPHA
  114.        depthFunc NOWRITE
  115.    }
  116. }   
  117.  
  118. SHADER TexturedFace
  119. {
  120.    Layer Lightmap
  121.    {
  122.        map $lightmap
  123.        blend NO
  124.    }
  125.    Layer Texture
  126.    {
  127.        map $texture
  128.        blend DESTCOLOR ZERO
  129.    }
  130. }