fMultiTexturesD.dfm 6.7 KB

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