Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.9 KiB

  1. /*--
  2. $Revision: 1 $
  3. Copyright (c) 1995, Microsoft Corporation
  4. --*/
  5. #ifndef _DXSHAD_H_
  6. #define _DXSHAD_H_
  7. //////////////////////////////////////////////////////////////////////////
  8. //
  9. // Needed extensions to D3D to support hardware, per pixel style shadows
  10. //
  11. //////////////////////////////////////////////////////////////////////////
  12. typedef struct _D3DSHADOWDATA {
  13. DWORD dwSize; /* Size of structure */
  14. DWORD dwFlags; /* Flags */
  15. LPDIRECTDRAWSURFACE lpDDSZBuffer; /* Shadow z-buffer surface */
  16. D3DMATRIX* lpD3DMatrixEye; /* Eye space transform matrix */
  17. D3DMATRIX* lpD3DMatrixLight; /* Light space transform matrix */
  18. D3DVALUE dvAttenuation; /* Attenuation of light in shadow */
  19. D3DVALUE dvZBiasMin; /* Minimum z bias */
  20. D3DVALUE dvZBiasMax; /* Maximum z bias */
  21. D3DVALUE dvUJitter; /* Shadow sample jitter in u */
  22. D3DVALUE dvVJitter; /* Shadow sample jitter in v */
  23. DWORD dwFilterSize; /* Size of shadow filter */
  24. } D3DSHADOWDATA, *LPD3DSHADOWDATA;
  25. // D3DSHADOWDATA dwFlags
  26. #define D3DSZBUF_ZBIAS 1
  27. #define D3DSZBUF_UVJITTER 2
  28. #define D3DSZBUF_TRIANGLEFILTER 4 /* for experimental purposes */
  29. // This structure is how shadow information is communicated
  30. // to the HAL
  31. typedef struct _D3DI_SHADOWDATA{
  32. DWORD dwSize; /* Size of structure */
  33. DWORD dwFlags; /* Flags */
  34. DDSURFACEDESC ddsdShadZ; /* Shadow z-buffer surface */
  35. DWORD dwShadZMaskU; /* ~(ddsdShadZ.dwWidth-1) */
  36. DWORD dwShadZMaskV; /* ~(ddsdShadZ.dwHeight-1) */
  37. D3DMATRIX MatrixShad; /* Embedded Concatenated screen to light space matrix */
  38. D3DVALUE dvAttenuation; /* Attenuation of light in shadow */
  39. D3DVALUE dvZBiasMin; /* Minimum z bias */
  40. D3DVALUE dvZBiasRange; /* Maximum z bias - Minimum z bias */
  41. D3DVALUE dvUJitter; /* 4.4 integer jitter in u */
  42. D3DVALUE dvVJitter; /* 4.4 integer jitter in v */
  43. DWORD dwFilterSize; /* Size of shadow filter */
  44. DWORD dwFilterArea; /* dwFilterSize*dwFilterSize */
  45. } D3DI_SHADOWDATA, *LPD3DI_SHADOWDATA;
  46. // Additional D3DI_SHADOWDATA dwFlags
  47. #define D3DSHAD_ENABLE 0x80000000 // set to enable shadowing
  48. typedef enum _D3DSHADOWFILTERSIZE {
  49. D3DSHADOWFILTERSIZE_1x1 = 1,
  50. D3DSHADOWFILTERSIZE_2x2,
  51. D3DSHADOWFILTERSIZE_3x3,
  52. D3DSHADOWFILTERSIZE_4x4,
  53. D3DSHADOWFILTERSIZE_5x5,
  54. D3DSHADOWFILTERSIZE_6x6,
  55. D3DSHADOWFILTERSIZE_7x7,
  56. D3DSHADOWFILTERSIZE_8x8,
  57. } D3DSHADOWFILTERSIZE;
  58. #endif // _DXSHAD_H_