Unit1.dfm 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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. OldCreateOrder = False
  14. OnCreate = FormCreate
  15. OnResize = FormResize
  16. PixelsPerInch = 96
  17. TextHeight = 13
  18. object GLSceneViewer1: TGLSceneViewer
  19. Left = 0
  20. Top = 0
  21. Width = 690
  22. Height = 541
  23. Camera = GLCamera1
  24. BeforeRender = GLSceneViewer1BeforeRender
  25. Buffer.BackgroundColor = clGray
  26. Buffer.AntiAliasing = aa4xHQ
  27. FieldOfView = 159.054977416992200000
  28. Align = alClient
  29. TabOrder = 0
  30. end
  31. object GLScene1: TGLScene
  32. Left = 24
  33. Top = 136
  34. object GLCamera1: TGLCamera
  35. DepthOfView = 100.000000000000000000
  36. FocalLength = 50.000000000000000000
  37. NearPlaneBias = 0.100000001490116100
  38. TargetObject = SceneRoot
  39. Position.Coordinates = {0000000000000040000040400000803F}
  40. end
  41. object GLCamera2: TGLCamera
  42. DepthOfView = 10.000000000000000000
  43. FocalLength = 50.000000000000000000
  44. TargetObject = SceneRoot
  45. Position.Coordinates = {0000004000000040000000400000803F}
  46. object GLLightSource1: TGLLightSource
  47. ConstAttenuation = 1.000000000000000000
  48. SpotCutOff = 180.000000000000000000
  49. object GLSphere1: TGLSphere
  50. Material.FrontProperties.Emission.Color = {FCFB7B3FE8E7673F000000000000803F}
  51. Scale.Coordinates = {CDCCCC3DCDCCCC3DCDCCCC3D00000000}
  52. Radius = 0.500000000000000000
  53. end
  54. end
  55. end
  56. object LightFBORenderer: TGLFBORenderer
  57. Width = 1024
  58. Height = 1024
  59. DepthTextureName = 'ShadowMap'
  60. MaterialLibrary = GLMaterialLibrary1
  61. ClearOptions = [coDepthBufferClear, coUseBufferBackground]
  62. Camera = GLCamera2
  63. SceneScaleFactor = 500.000000000000000000
  64. RootObject = SceneRoot
  65. EnabledRenderBuffers = []
  66. PostGenerateMipmap = False
  67. end
  68. object SceneRoot: TGLDummyCube
  69. CubeSize = 1.000000000000000000
  70. object PrepareShadowMapping: TGLDirectOpenGL
  71. UseBuildList = False
  72. OnRender = PrepareShadowMappingRender
  73. Blend = False
  74. end
  75. object GLPlane1: TGLPlane
  76. Material.MaterialLibrary = GLMaterialLibrary1
  77. Material.LibMaterialName = 'Chekers2'
  78. Direction.Coordinates = {000000000000803F0000000000000000}
  79. Position.Coordinates = {00000000333333BF000000000000803F}
  80. Up.Coordinates = {0000000000000000000080BF00000000}
  81. Height = 8.000000000000000000
  82. Width = 8.000000000000000000
  83. XTiles = 2
  84. YTiles = 2
  85. end
  86. object GLTorus1: TGLTorus
  87. Material.MaterialLibrary = GLMaterialLibrary1
  88. Material.LibMaterialName = 'Chekers'
  89. MajorRadius = 0.400000005960464500
  90. MinorRadius = 0.100000001490116100
  91. StopAngle = 360.000000000000000000
  92. Parts = [toSides, toStartDisk, toStopDisk]
  93. end
  94. object GLCylinder1: TGLCylinder
  95. Material.MaterialLibrary = GLMaterialLibrary1
  96. Material.LibMaterialName = 'mask'
  97. Position.Coordinates = {0000403F000000006666663F0000803F}
  98. Up.Coordinates = {000000000000803F0000008000000000}
  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