fMultiTexturesC.dfm 6.7 KB

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