| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- (* Projected Textures example.
- Controls:
- Left Mouse Button: Rotate
- Right Mouse Button: Adjust Distance
- 'S': Change styles
- The TGLProjectedTextures object can be used to simulate
- projected lights or other special effects. To use it, add
- it to the scene and set all objects that should receive
- the projected textures as children. Then, add a number
- of TGLTextureEmitter and load the texture that should
- be projected into it. Add this emitter to the "emitters"
- list of the projtex and that's it.
- There are two styles of projection: original and inverse.
- On the original method (developed by Tom Nuyens of
- www.delphi3d.net) the scene is rendered and the textures
- are projected into it. This is useful to simulate all
- kinds of special effects from bullet holes, to shadow
- maps (using tmBlend texture mode).
- On the inverse method, first all emitters are rendered,
- creating an "illumination mask". Then the scene is blended
- to this mask, so that only lit pixels are drawn. This can
- be used to create a projected-texture only illumination system.
- *)
- program ProjTexturesD;
- uses
- Forms,
- fProjTexturesD in 'fProjTexturesD.pas' {FormProjTextures};
- {$R *.RES}
- begin
- Application.Initialize;
- Application.CreateForm(TFormProjTextures, FormProjTextures);
- Application.Run;
- end.
|