fMultiTexturesC.dfm 6.5 KB

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