MultiTexture.dpr 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {: This sample mixes two textures by using multitexturing.
  2. Multitexturing requires at least two materials in the material library:<ul>
  3. <li>a base material: determines the basic properties, incl. blending, colors
  4. and lighting-related properties
  5. <li>a second material: determines the second texture (color and other
  6. properties are ignored)
  7. </ul>
  8. This structure allows reuse of second textures among a variety of materials,
  9. this is particularly usefull for details maps, which are usually just "noise"
  10. to be applied on different base textures. You can also use it to reuse a basic
  11. standard lighting map throughout many objects, thus reducing texture memory
  12. needs (many shadows can be derived from a few deformed basic maps).
  13. The texture matrix (scale, offset) are adjusted independantly for the two
  14. textures, in this sample, the TrackBar adjusts an isotropic scaling.
  15. When multi-texturing, never forget that both texture modes (decal, modulate etc.)
  16. are honoured. For instance, if you "Decal" a non-transparent second texture,
  17. the base texture will be completely replaced!
  18. }
  19. program MultiTexture;
  20. uses
  21. Forms,
  22. fMultiTexture in 'fMultiTexture.pas' {Form1};
  23. {$R *.RES}
  24. begin
  25. Application.Initialize;
  26. Application.CreateForm(TForm1, Form1);
  27. Application.Run;
  28. end.