fShadowFBOD.dfm 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. object FormShadowFBO: TFormShadowFBO
  2. Left = 273
  3. Top = 234
  4. Caption = 'Shadow Mapping FBO'
  5. ClientHeight = 479
  6. ClientWidth = 657
  7. Color = clBtnFace
  8. Font.Charset = DEFAULT_CHARSET
  9. Font.Color = clWindowText
  10. Font.Height = -11
  11. Font.Name = 'Tahoma'
  12. Font.Style = []
  13. Position = poScreenCenter
  14. OnCreate = FormCreate
  15. OnResize = FormResize
  16. TextHeight = 13
  17. object GLSceneViewer1: TGLSceneViewer
  18. Left = 0
  19. Top = 0
  20. Width = 657
  21. Height = 479
  22. Camera = GLCamera1
  23. Buffer.BackgroundColor = clGray
  24. Buffer.AntiAliasing = aa4xHQ
  25. FieldOfView = 156.415664672851600000
  26. PenAsTouch = False
  27. Align = alClient
  28. TabOrder = 0
  29. end
  30. object GLScene1: TGLScene
  31. Left = 24
  32. Top = 136
  33. object GLCamera1: TGLCamera
  34. DepthOfView = 100.000000000000000000
  35. FocalLength = 50.000000000000000000
  36. NearPlaneBias = 0.100000001490116100
  37. TargetObject = SceneRoot
  38. Position.Coordinates = {0000000000000040000040400000803F}
  39. end
  40. object GLCamera2: TGLCamera
  41. DepthOfView = 10.000000000000000000
  42. FocalLength = 50.000000000000000000
  43. TargetObject = SceneRoot
  44. Position.Coordinates = {0000004000000040000000400000803F}
  45. object GLLightSource1: TGLLightSource
  46. ConstAttenuation = 1.000000000000000000
  47. SpotCutOff = 180.000000000000000000
  48. object GLSphere1: TGLSphere
  49. Material.FrontProperties.Emission.Color = {FCFB7B3FE8E7673F000000000000803F}
  50. Scale.Coordinates = {CDCCCC3DCDCCCC3DCDCCCC3D00000000}
  51. Radius = 0.500000000000000000
  52. end
  53. end
  54. end
  55. object LightFBORenderer: TGLFBORenderer
  56. Width = 1024
  57. Height = 1024
  58. DepthTextureName = 'ShadowMap'
  59. MaterialLibrary = GLMaterialLibrary1
  60. ClearOptions = [coDepthBufferClear, coUseBufferBackground]
  61. Camera = GLCamera2
  62. SceneScaleFactor = 500.000000000000000000
  63. RootObject = SceneRoot
  64. EnabledRenderBuffers = []
  65. BeforeRender = LightFBORendererBeforeRender
  66. AfterRender = LightFBORendererAfterRender
  67. PostGenerateMipmap = False
  68. end
  69. object SceneRoot: TGLDummyCube
  70. CubeSize = 1.000000000000000000
  71. object PrepareShadowMapping: TGLDirectOpenGL
  72. UseBuildList = False
  73. OnRender = PrepareShadowMappingRender
  74. Blend = False
  75. end
  76. object GLPlane1: TGLPlane
  77. Material.MaterialLibrary = GLMaterialLibrary1
  78. Material.LibMaterialName = 'Chekers2'
  79. Direction.Coordinates = {000000000000803F0000000000000000}
  80. Position.Coordinates = {00000000333333BF000000000000803F}
  81. Up.Coordinates = {0000000000000000000080BF00000000}
  82. Height = 8.000000000000000000
  83. Width = 8.000000000000000000
  84. XTiles = 2
  85. YTiles = 2
  86. end
  87. object GLTorus1: TGLTorus
  88. Material.MaterialLibrary = GLMaterialLibrary1
  89. Material.LibMaterialName = 'Chekers'
  90. MajorRadius = 0.400000005960464500
  91. MinorRadius = 0.100000001490116100
  92. StopAngle = 360.000000000000000000
  93. Parts = [toSides, toStartDisk, toStopDisk]
  94. end
  95. object GLCylinder1: TGLCylinder
  96. Material.MaterialLibrary = GLMaterialLibrary1
  97. Material.LibMaterialName = 'mask'
  98. Position.Coordinates = {0000403F000000006666663F0000803F}
  99. BottomRadius = 0.100000001490116100
  100. Height = 2.000000000000000000
  101. Slices = 20
  102. Stacks = 1
  103. TopRadius = 0.100000001490116100
  104. end
  105. object GLFreeForm1: TGLFreeForm
  106. Material.MaterialLibrary = GLMaterialLibrary1
  107. Material.LibMaterialName = 'bark'
  108. Direction.Coordinates = {000000000000803F0000000000000000}
  109. Position.Coordinates = {0000803F000000BF000080BF0000803F}
  110. Up.Coordinates = {0000002800000000000080BF00000000}
  111. AutoScaling.Coordinates = {0000003F0000003F0000003F0000803F}
  112. end
  113. end
  114. object GLShadowTextureSprite: TGLHUDSprite
  115. Material.MaterialLibrary = GLMaterialLibrary1
  116. Material.LibMaterialName = 'ShowShadowMap'
  117. Position.Coordinates = {0000804200008042000000000000803F}
  118. Width = 128.000000000000000000
  119. Height = 128.000000000000000000
  120. Rotation = 0.000000000000000000
  121. end
  122. end
  123. object GLMaterialLibrary1: TGLMaterialLibrary
  124. Materials = <
  125. item
  126. Name = 'ShowShadowMap'
  127. Tag = 0
  128. Shader = GLSLShader1
  129. end
  130. item
  131. Name = 'ShadowMap'
  132. Tag = 0
  133. Material.Texture.ImageClassName = 'TGLBlankImage'
  134. Material.Texture.Image.ColorFormat = 6408
  135. Material.Texture.MinFilter = miLinear
  136. Material.Texture.TextureMode = tmReplace
  137. Material.Texture.TextureWrap = twSeparate
  138. Material.Texture.TextureWrapS = twClampToBorder
  139. Material.Texture.TextureWrapT = twClampToBorder
  140. Material.Texture.TextureWrapR = twClampToBorder
  141. Material.Texture.TextureFormat = tfExtended
  142. Material.Texture.TextureFormatEx = tfDEPTH_COMPONENT24
  143. Material.Texture.BorderColor.Color = {0000803F000000000000000000000000}
  144. Material.Texture.TextureCompareMode = tcmCompareRtoTexture
  145. end
  146. item
  147. Name = 'mask'
  148. Tag = 0
  149. Material.BlendingMode = bmTransparency
  150. Material.Texture.TextureWrap = twSeparate
  151. Material.FaceCulling = fcNoCull
  152. TextureScale.Coordinates = {00004040000040400000A04000000000}
  153. Shader = GLSLShader2
  154. end
  155. item
  156. Name = 'Chekers'
  157. Tag = 0
  158. Shader = GLSLShader2
  159. end
  160. item
  161. Name = 'Chekers2'
  162. Tag = 0
  163. Shader = GLSLShader2
  164. end
  165. item
  166. Name = 'Lightspot'
  167. Tag = 0
  168. Material.Texture.TextureWrap = twNone
  169. Shader = GLSLShader2
  170. end
  171. item
  172. Name = 'bark'
  173. Tag = 0
  174. end>
  175. Left = 24
  176. Top = 184
  177. end
  178. object GLCadencer1: TGLCadencer
  179. Scene = GLScene1
  180. TimeMultiplier = 2.000000000000000000
  181. OnProgress = GLCadencer1Progress
  182. Left = 96
  183. Top = 136
  184. end
  185. object Timer1: TTimer
  186. Left = 96
  187. Top = 184
  188. end
  189. object GLSLShader1: TGLSLShader
  190. Enabled = False
  191. OnApply = GLSLShader1Apply
  192. OnUnApply = GLSLShader1UnApply
  193. Left = 24
  194. Top = 232
  195. end
  196. object GLSLShader2: TGLSLShader
  197. Enabled = False
  198. OnApply = GLSLShader2Apply
  199. OnInitialize = GLSLShader2Initialize
  200. Left = 24
  201. Top = 280
  202. end
  203. object GLNavigation: TGLSimpleNavigation
  204. Form = Owner
  205. GLSceneViewer = GLSceneViewer1
  206. FormCaption = 'Shadow Mapping FBO - %FPS'
  207. KeyCombinations = <
  208. item
  209. ShiftState = [ssLeft, ssRight]
  210. Action = snaZoom
  211. end
  212. item
  213. ShiftState = [ssLeft]
  214. Action = snaMoveAroundTarget
  215. end
  216. item
  217. ShiftState = [ssRight]
  218. Action = snaMoveAroundTarget
  219. end>
  220. Left = 96
  221. Top = 232
  222. end
  223. end