bmap_to_cubemap( BMAP*)

Diese Anweisung konvertiert eine 6-seitige Sky-Cube Bitmap in eine Cubic Enviroment Map, welche für Enviroment Mapping und Shader Effekte verwendet werden kann.

Parameter:

BMAP* - Pointer auf Sky-Cube-Bitmap bmap

Bemerkungen:

Geschwindigkeit:

Langsam

Edition:

 C   P 

Beispiel:


BMAP* bmpEnviro = "skybox+6.tga";

MATERIAL* mtlEnviro =
{
   skin2 = bmpEnviro;
   effect = "
      texture mtlSkin2;
      technique enviro
      {
         pass P0
         {
            Texture[0] = <mtlSkin2>;
            AddressU[0] = Clamp; // don't wrap around edges
            AddressV[0] = Clamp;
            ColorOp[0] = SelectArg1; // ignore the ambient light
            ColorArg1[0] = Texture;
            TexCoordIndex[0] = CameraSpaceReflectionVector;
            TextureTransformFlags[0] = Count3;
         }
      }

      technique fallback { pass p0 { } } // empty fallback causes normal rendering without effect
   ";
}

function mtlEnviro_startup()
{
   bmap_to_cubemap(mtlEnviro.skin2);
}

Siehe auch:

CUBE, view.bmap

► Aktuelle Version Online