fShadowFBOC.dfm 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. object Form1: TForm1
  2. Left = 0
  3. Top = 0
  4. Caption = 'Shadow Mapping FBO'
  5. ClientHeight = 541
  6. ClientWidth = 690
  7. Color = clBtnFace
  8. Font.Charset = DEFAULT_CHARSET
  9. Font.Color = clWindowText
  10. Font.Height = -11
  11. Font.Name = 'Tahoma'
  12. Font.Style = []
  13. OnCreate = FormCreate
  14. OnResize = FormResize
  15. TextHeight = 13
  16. object GLSceneViewer1: TGLSceneViewer
  17. Left = 0
  18. Top = 0
  19. Width = 690
  20. Height = 541
  21. Camera = GLCamera1
  22. BeforeRender = GLSceneViewer1BeforeRender
  23. Buffer.BackgroundColor = clGray
  24. Buffer.AntiAliasing = aa4xHQ
  25. FieldOfView = 159.054977416992200000
  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. PostGenerateMipmap = False
  66. end
  67. object SceneRoot: TGLDummyCube
  68. CubeSize = 1.000000000000000000
  69. object PrepareShadowMapping: TGLDirectOpenGL
  70. UseBuildList = False
  71. OnRender = PrepareShadowMappingRender
  72. Blend = False
  73. end
  74. object GLPlane1: TGLPlane
  75. Material.MaterialLibrary = GLMaterialLibrary1
  76. Material.LibMaterialName = 'Chekers2'
  77. Direction.Coordinates = {000000000000803F0000000000000000}
  78. Position.Coordinates = {00000000333333BF000000000000803F}
  79. Up.Coordinates = {0000000000000000000080BF00000000}
  80. Height = 8.000000000000000000
  81. Width = 8.000000000000000000
  82. XTiles = 2
  83. YTiles = 2
  84. end
  85. object GLTorus1: TGLTorus
  86. Material.MaterialLibrary = GLMaterialLibrary1
  87. Material.LibMaterialName = 'Chekers'
  88. MajorRadius = 0.400000005960464500
  89. MinorRadius = 0.100000001490116100
  90. StopAngle = 360.000000000000000000
  91. Parts = [toSides, toStartDisk, toStopDisk]
  92. end
  93. object GLCylinder1: TGLCylinder
  94. Material.MaterialLibrary = GLMaterialLibrary1
  95. Material.LibMaterialName = 'mask'
  96. Position.Coordinates = {0000403F000000006666663F0000803F}
  97. BottomRadius = 0.100000001490116100
  98. Height = 2.000000000000000000
  99. Slices = 20
  100. Stacks = 1
  101. TopRadius = 0.100000001490116100
  102. end
  103. object GLFreeForm1: TGLFreeForm
  104. Material.MaterialLibrary = GLMaterialLibrary1
  105. Material.LibMaterialName = 'bark'
  106. Direction.Coordinates = {000000000000803F0000000000000000}
  107. Position.Coordinates = {0000803F000000BF000080BF0000803F}
  108. Up.Coordinates = {0000002800000000000080BF00000000}
  109. AutoScaling.Coordinates = {0000003F0000003F0000003F0000803F}
  110. end
  111. end
  112. object GLShadowTextureSprite: TGLHUDSprite
  113. Material.MaterialLibrary = GLMaterialLibrary1
  114. Material.LibMaterialName = 'ShowShadowMap'
  115. Position.Coordinates = {0000804200008042000000000000803F}
  116. Width = 128.000000000000000000
  117. Height = 128.000000000000000000
  118. Rotation = 0.000000000000000000
  119. end
  120. end
  121. object GLMaterialLibrary1: TGLMaterialLibrary
  122. Materials = <
  123. item
  124. Name = 'ShowShadowMap'
  125. Tag = 0
  126. Shader = GLSLShader1
  127. end
  128. item
  129. Name = 'ShadowMap'
  130. Tag = 0
  131. Material.Texture.ImageClassName = 'TGLBlankImage'
  132. Material.Texture.Image.ColorFormat = 6408
  133. Material.Texture.MinFilter = miLinear
  134. Material.Texture.TextureMode = tmReplace
  135. Material.Texture.TextureWrap = twSeparate
  136. Material.Texture.TextureWrapS = twClampToBorder
  137. Material.Texture.TextureWrapT = twClampToBorder
  138. Material.Texture.TextureWrapR = twClampToBorder
  139. Material.Texture.TextureFormat = tfExtended
  140. Material.Texture.TextureFormatEx = tfDEPTH_COMPONENT24
  141. Material.Texture.BorderColor.Color = {0000803F000000000000000000000000}
  142. Material.Texture.TextureCompareMode = tcmCompareRtoTexture
  143. end
  144. item
  145. Name = 'mask'
  146. Tag = 0
  147. Material.BlendingMode = bmTransparency
  148. Material.Texture.TextureWrap = twSeparate
  149. Material.FaceCulling = fcNoCull
  150. TextureScale.Coordinates = {00004040000040400000A04000000000}
  151. Shader = GLSLShader2
  152. end
  153. item
  154. Name = 'Chekers'
  155. Tag = 0
  156. Shader = GLSLShader2
  157. end
  158. item
  159. Name = 'Chekers2'
  160. Tag = 0
  161. Shader = GLSLShader2
  162. end
  163. item
  164. Name = 'Lightspot'
  165. Tag = 0
  166. Material.Texture.TextureWrap = twNone
  167. Shader = GLSLShader2
  168. end
  169. item
  170. Name = 'bark'
  171. Tag = 0
  172. end>
  173. Left = 24
  174. Top = 184
  175. end
  176. object GLCadencer1: TGLCadencer
  177. Scene = GLScene1
  178. TimeMultiplier = 2.000000000000000000
  179. OnProgress = GLCadencer1Progress
  180. Left = 96
  181. Top = 136
  182. end
  183. object Timer1: TTimer
  184. Left = 96
  185. Top = 184
  186. end
  187. object GLSLShader1: TGLSLShader
  188. Enabled = False
  189. OnApply = GLSLShader1Apply
  190. OnUnApply = GLSLShader1UnApply
  191. Left = 24
  192. Top = 232
  193. end
  194. object GLSLShader2: TGLSLShader
  195. Enabled = False
  196. OnApply = GLSLShader2Apply
  197. OnInitialize = GLSLShader2Initialize
  198. Left = 24
  199. Top = 280
  200. end
  201. object GLNavigation: TGLSimpleNavigation
  202. Form = Owner
  203. GLSceneViewer = GLSceneViewer1
  204. FormCaption = 'Shadow Mapping FBO - %FPS'
  205. KeyCombinations = <
  206. item
  207. ShiftState = [ssLeft, ssRight]
  208. Action = snaZoom
  209. end
  210. item
  211. ShiftState = [ssLeft]
  212. Action = snaMoveAroundTarget
  213. end
  214. item
  215. ShiftState = [ssRight]
  216. Action = snaMoveAroundTarget
  217. end>
  218. Left = 96
  219. Top = 232
  220. end
  221. end