ShadowPlaneD.dpr 1.2 KB

1234567891011121314151617181920212223242526272829
  1. (* Simple projective shadows.
  2. The TGLShadowPlane component allows to render simple projective shadows.
  3. They have the benefit of being quite fast, but as the name says, your shadows
  4. will be projected only on a plane and must be (entirely) on the same side
  5. of the plane as the light (the side pointed by the plane's direction).
  6. Note that stenciling is required for proper operation (it is an option of
  7. the Viewer.Buffer.ContextOptions), which should be available on all modern
  8. graphics hardware. When stenciling is not activated, the ShadowPlane will
  9. use opaque shadows and you may see shadows appear beyond the plane limits...
  10. The higher quality lighting on the marble planes is obtained by specifying
  11. Tiles in the plane and removing 'psSingleQuad' from the style. Lighting
  12. is computed per-vertex, this changes increase drastically the number of
  13. vertices that make up the planes, thus allowing for better lighting.
  14. *)
  15. program ShadowPlaneD;
  16. uses
  17. Forms,
  18. fShadowPlaneD in 'fShadowPlaneD.pas' {FormShadowPlane};
  19. {$R *.res}
  20. begin
  21. Application.Initialize;
  22. Application.CreateForm(TFormShadowPlane, FormShadowPlane);
  23. Application.Run;
  24. end.