Unit1.dfm 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. object Form1: TForm1
  2. Left = 0
  3. Top = 0
  4. Caption = 'Multisample Textures'
  5. ClientHeight = 419
  6. ClientWidth = 569
  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 MainViewer: TGLSceneViewer
  19. Left = 0
  20. Top = 0
  21. Width = 569
  22. Height = 419
  23. Camera = MainCamera
  24. BeforeRender = MainViewerBeforeRender
  25. Buffer.FogEnvironment.FogStart = 10.000000000000000000
  26. Buffer.FogEnvironment.FogEnd = 100.000000000000000000
  27. Buffer.BackgroundColor = clGray
  28. FieldOfView = 133.503829956054700000
  29. Align = alClient
  30. TabOrder = 0
  31. end
  32. object MainScene: TGLScene
  33. Left = 24
  34. Top = 8
  35. object MainCamera: TGLCamera
  36. DepthOfView = 1024.000000000000000000
  37. FocalLength = 90.000000000000000000
  38. NearPlaneBias = 0.001000000047497451
  39. TargetObject = SceneObjects
  40. Position.Coordinates = {0000204100002041000020410000803F}
  41. object TestLight: TGLLightSource
  42. ConstAttenuation = 1.000000000000000000
  43. SpotCutOff = 180.000000000000000000
  44. end
  45. end
  46. object FBOContainer: TGLDummyCube
  47. CubeSize = 1.000000000000000000
  48. object MultisampleFBO: TGLFBORenderer
  49. ColorTextureName = 'MultisampledColor'
  50. DepthTextureName = 'Depth'
  51. MaterialLibrary = MainMaterialLibrary
  52. ClearOptions = [coColorBufferClear, coDepthBufferClear, coUseBufferBackground]
  53. Camera = MainCamera
  54. RootObject = SceneObjects
  55. TargetVisibility = tvFBOOnly
  56. EnabledRenderBuffers = []
  57. end
  58. end
  59. object SceneObjects: TGLDummyCube
  60. CubeSize = 1.000000000000000000
  61. object GLSphere1: TGLSphere
  62. Material.FrontProperties.Diffuse.Color = {0000000000000000000000000000803F}
  63. Material.PolygonMode = pmLines
  64. Radius = 4.000000000000000000
  65. end
  66. object GLTorus1: TGLTorus
  67. Material.FrontProperties.Diffuse.Color = {C6BF3F3FDCD8583FDCD8583F0000803F}
  68. Direction.Coordinates = {000000000000803F0000000000000000}
  69. Up.Coordinates = {030080A700000000000080BF00000000}
  70. MajorRadius = 3.000000000000000000
  71. MinorRadius = 0.600000023841857900
  72. Sides = 32
  73. StopAngle = 360.000000000000000000
  74. Parts = [toSides, toStartDisk, toStopDisk]
  75. end
  76. object GLTorus2: TGLTorus
  77. Material.FrontProperties.Diffuse.Color = {C6BF3F3FDCD8583FDCD8583F0000803F}
  78. MajorRadius = 3.000000000000000000
  79. MinorRadius = 0.600000023841857900
  80. Sides = 32
  81. StopAngle = 360.000000000000000000
  82. Parts = [toSides, toStartDisk, toStopDisk]
  83. end
  84. object GLCone1: TGLCone
  85. Material.FrontProperties.Diffuse.Color = {E4DB5B3FEBE0E03EE4DB5B3F0000803F}
  86. Direction.Coordinates = {000000000000803F0000000000000000}
  87. Position.Coordinates = {CDCC4C3E00000000CDCC4C3E0000803F}
  88. Up.Coordinates = {0000000000000000000080BF00000000}
  89. BottomRadius = 0.500000000000000000
  90. Height = 5.000000000000000000
  91. end
  92. object GLLines1: TGLLines
  93. AntiAliased = True
  94. LineColor.Color = {EBE0E03EE4DB5B3F9A93133F0000803F}
  95. LinePattern = 255
  96. LineWidth = 5.000000000000000000
  97. Nodes = <
  98. item
  99. X = 6.000000000000000000
  100. end
  101. item
  102. Z = 6.000000000000000000
  103. end
  104. item
  105. X = -6.000000000000000000
  106. end
  107. item
  108. Z = -6.000000000000000000
  109. end
  110. item
  111. X = 6.000000000000000000
  112. end>
  113. Options = []
  114. end
  115. end
  116. object GLScreenQuad: TGLHUDSprite
  117. Material.MaterialLibrary = MainMaterialLibrary
  118. Material.LibMaterialName = 'Result'
  119. Rotation = 0.000000000000000000
  120. end
  121. object GLHUDText1: TGLHUDText
  122. BitmapFont = GLWindowsBitmapFont1
  123. Rotation = 0.000000000000000000
  124. end
  125. end
  126. object MainCadencer: TGLCadencer
  127. Scene = MainScene
  128. OnProgress = MainCadencerProgress
  129. Left = 192
  130. Top = 8
  131. end
  132. object MainMaterialLibrary: TGLMaterialLibrary
  133. Materials = <
  134. item
  135. Name = 'MultisampledColor'
  136. Tag = 0
  137. Material.Texture.ImageClassName = 'TGLBlankImage'
  138. Material.Texture.Image.ColorFormat = 6408
  139. Material.Texture.Disabled = False
  140. end
  141. item
  142. Name = 'Depth'
  143. Tag = 0
  144. Material.Texture.ImageClassName = 'TGLBlankImage'
  145. Material.Texture.Image.ColorFormat = 6408
  146. Material.Texture.TextureFormat = tfExtended
  147. Material.Texture.TextureFormatEx = tfDEPTH_COMPONENT32
  148. Material.Texture.Disabled = False
  149. end
  150. item
  151. Name = 'Result'
  152. Tag = 0
  153. Shader = GLSLShader1
  154. end>
  155. Left = 104
  156. Top = 8
  157. end
  158. object GLSLShader1: TGLSLShader
  159. Enabled = False
  160. FragmentProgram.Code.Strings = (
  161. '#version 150'
  162. '#define SamplesCount 4'
  163. ''
  164. 'in vec4 TexCoord;'
  165. 'out vec4 color;'
  166. 'uniform sampler2DMS TexUnit0;'
  167. 'uniform vec2 ViewerSize;'
  168. ''
  169. 'void main()'
  170. '{'
  171. #9'vec4 final = vec4(0.0, 0.0, 0.0, 0.0);'
  172. #9'int i;'
  173. #9'for (i=0; i<SamplesCount; i++)'
  174. #9'{'#9
  175. #9#9'vec4 sample = texelFetch(TexUnit0, ivec2(ViewerSize* TexCoord.' +
  176. 'xy), i);'
  177. #9#9'final += sample;'
  178. #9'}'
  179. #9'color = final / SamplesCount;'
  180. '}')
  181. FragmentProgram.Enabled = True
  182. VertexProgram.Code.Strings = (
  183. '#version 150'
  184. ''
  185. 'in vec4 FTransform;'
  186. 'out vec4 TexCoord;'
  187. ''
  188. 'void main()'
  189. '{'
  190. #9'gl_Position = FTransform;'
  191. #9'TexCoord = FTransform * 0.5 + 0.5;'
  192. '}')
  193. VertexProgram.Enabled = True
  194. OnApply = GLSLShader1Apply
  195. Left = 24
  196. Top = 120
  197. end
  198. object GLSimpleNavigation1: TGLSimpleNavigation
  199. Form = Owner
  200. GLSceneViewer = MainViewer
  201. FormCaption = 'Multisample Texture - %FPS'
  202. KeyCombinations = <
  203. item
  204. ShiftState = [ssLeft, ssRight]
  205. Action = snaZoom
  206. end
  207. item
  208. ShiftState = [ssLeft]
  209. Action = snaMoveAroundTarget
  210. end
  211. item
  212. ShiftState = [ssRight]
  213. Action = snaMoveAroundTarget
  214. end>
  215. Left = 24
  216. Top = 64
  217. end
  218. object GLWindowsBitmapFont1: TGLWindowsBitmapFont
  219. Font.Charset = DEFAULT_CHARSET
  220. Font.Color = clWhite
  221. Font.Height = -11
  222. Font.Name = 'MS Sans Serif'
  223. Font.Style = []
  224. Left = 104
  225. Top = 64
  226. end
  227. end