Bloom.material
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:3k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. //DirectX 9.0 HLSL Vertex Shader vs_1_1
  2. vertex_program Blur0_vs11 hlsl
  3. {
  4. source Blur0_vs11.hlsl
  5. target vs_1_1
  6. entry_point main
  7. }
  8. //DirectX 9.0 HLSL Pixel Shader ps_2_0
  9. fragment_program Blur0_ps20 hlsl
  10. {
  11. source Blur0_ps20.hlsl
  12. target ps_2_0
  13. entry_point main
  14. }
  15. //DirectX 9.0 HLSL Vertex Shader vs_1_1
  16. vertex_program Blur1_vs11 hlsl
  17. {
  18. source Blur1_vs11.hlsl
  19. target vs_1_1
  20. entry_point main
  21. }
  22. //DirectX 9.0 HLSL Pixel Shader ps_2_0
  23. fragment_program Blur1_ps20 hlsl
  24. {
  25. source Blur1_ps20.hlsl
  26. target ps_2_0
  27. entry_point main
  28. }
  29. vertex_program Blur0_vs_glsl glsl
  30. {
  31. source Blur0_vs.glsl
  32. }
  33. vertex_program Blur1_vs_glsl glsl
  34. {
  35. source Blur1_vs.glsl
  36. }
  37. fragment_program Blur_ps_glsl glsl
  38. {
  39. source Blur_ps.glsl
  40. default_params
  41. {
  42. param_named tex0 int 0
  43. }
  44. }
  45. //Effect: Bloom
  46. material Ogre/Compositor/Blur0
  47. {
  48. technique
  49. {
  50. //Rendering Pass: Blur0 (pass index: #1 )
  51. pass
  52. {
  53. //State: D3DRS_CULLMODE, Value : D3DCULL_NONE
  54. cull_hardware none
  55. cull_software none
  56. depth_check off
  57. fragment_program_ref Blur0_ps20
  58. {
  59. }
  60. vertex_program_ref Blur0_vs11
  61. {
  62. }
  63. texture_unit RT
  64. {
  65.                 tex_coord_set 0
  66. tex_address_mode clamp
  67. filtering linear linear linear
  68. }
  69. }
  70. }
  71. technique
  72. {
  73. //Rendering Pass: Blur0 (pass index: #1 )
  74. pass
  75. {
  76. cull_hardware none
  77. cull_software none
  78. depth_check off
  79. fragment_program_ref Blur_ps_glsl
  80. {
  81. }
  82. vertex_program_ref Blur0_vs_glsl
  83. {
  84. }
  85. texture_unit RT
  86. {
  87.                 tex_coord_set 0
  88. tex_address_mode clamp
  89. filtering linear linear linear
  90. }
  91. }
  92. }
  93. }
  94. material Ogre/Compositor/Blur1
  95. {
  96. technique
  97. {
  98. //Rendering Pass: Blur1 (pass index: #2 )
  99. pass
  100. {
  101. cull_hardware none
  102. cull_software none
  103. depth_check off
  104. fragment_program_ref Blur1_ps20
  105. {
  106. }
  107. vertex_program_ref Blur1_vs11
  108. {
  109. }
  110. texture_unit
  111. {
  112.                 tex_coord_set 0
  113. tex_address_mode clamp
  114. filtering linear linear linear
  115. }
  116. }
  117. }
  118. technique
  119. {
  120. //Rendering Pass: Blur1 (pass index: #2 )
  121. pass
  122. {
  123. cull_hardware none
  124. cull_software none
  125. depth_func always_pass
  126. fragment_program_ref Blur_ps_glsl
  127. {
  128. }
  129. vertex_program_ref Blur1_vs_glsl
  130. {
  131. }
  132. texture_unit
  133. {
  134.                 tex_coord_set 0
  135. tex_address_mode clamp
  136. filtering linear linear linear
  137. }
  138. }
  139. }
  140. }
  141. /// Overlay quad
  142. material Ogre/Compositor/BloomBlend
  143. {
  144.     technique
  145.     {
  146.         pass
  147.         {
  148.             lighting on
  149.             diffuse 0.0 0.0 0.0 0.6
  150.             specular 0.0 0.0 0.0 0.0
  151.             ambient 0.0 0.0 0.0
  152.             emissive 1.0 1.0 1.0
  153.             cull_hardware none
  154.             depth_check off
  155.             scene_blend alpha_blend
  156.             texture_unit
  157.             {
  158.                 tex_coord_set 0
  159. tex_address_mode clamp
  160. filtering linear linear linear
  161.             }
  162.         }
  163.     }
  164. }