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

游戏引擎

开发平台:

Visual C++

  1. ///////////////////////////////////
  2. //  PASS 0
  3. // HEAT CASTERS PASS
  4. ///////////////////////////////////
  5. vertex_program Fury/HeatVision/HeatCaster_vp cg
  6. {
  7.    source HeatVision.cg
  8.    entry_point HeatCaster_vp
  9.    profiles vs_1_1 arbvp1
  10. }
  11. fragment_program Fury/HeatVision/HeatCaster_fp cg
  12. {
  13.    source HeatVision.cg
  14.    entry_point HeatCaster_fp
  15.    profiles ps_2_0 arbfp1
  16. }
  17. material Fury/HeatVision/HeatCaster
  18. {
  19.     technique
  20.     {
  21.         pass
  22.         {
  23.             vertex_program_ref Fury/HeatVision/HeatCaster_vp
  24.             {
  25.                 param_named_auto eyePosition camera_position_object_space
  26.                 param_named_auto worldViewProj worldviewproj_matrix
  27.             }
  28.             fragment_program_ref Fury/HeatVision/HeatCaster_fp
  29.             {
  30.             }
  31.         }
  32.     }
  33. }
  34. ///////////////////////////////////
  35. //  PASS 0
  36. // HEAT CASTERS PASS
  37. ///////////////////////////////////
  38. vertex_program Fury/HeatVision/ColdCaster_vp cg
  39. {
  40.    source HeatVision.cg
  41.    entry_point ColdCaster_vp
  42.    profiles vs_1_1 arbvp1
  43. }
  44. fragment_program Fury/HeatVision/ColdCaster_fp cg
  45. {
  46.    source HeatVision.cg
  47.    entry_point ColdCaster_fp
  48.    profiles ps_2_0 arbfp1
  49. }
  50. material Fury/HeatVision/ColdCaster
  51. {
  52.     technique
  53.     {
  54.         pass
  55.         {
  56.             vertex_program_ref Fury/HeatVision/ColdCaster_vp
  57.             {
  58.                 param_named_auto eyePosition camera_position_object_space
  59.                 param_named_auto worldViewProj worldviewproj_matrix
  60.             }
  61.             fragment_program_ref Fury/HeatVision/ColdCaster_fp
  62.             {
  63.             }
  64.         }
  65.     }
  66. }
  67. ///////////////////////////////////
  68. //   PASS 1
  69. //  LIGHT TO HEAT CONVERSION PASS
  70. ///////////////////////////////////
  71. vertex_program Fury/HeatVision/LightToHeat_vp cg
  72. {
  73.    source HeatVision.cg
  74.    entry_point LightToHeat_vp
  75.    profiles vs_1_1 arbvp1
  76.     default_params
  77.     {
  78.         param_named_auto flipping render_target_flipping
  79.     }
  80. }
  81. fragment_program Fury/HeatVision/LightToHeat_fp cg
  82. {
  83.    source HeatVision.cg
  84.    entry_point LightToHeat_fp
  85.    profiles ps_2_0 arbfp1
  86. }
  87. material Fury/HeatVision/LightToHeat
  88. {
  89.     technique
  90.     {
  91.         // pass 1
  92.         pass
  93.         {
  94. cull_hardware none
  95. cull_software none
  96. depth_func always_pass
  97.             vertex_program_ref Fury/HeatVision/LightToHeat_vp
  98.             {
  99.             }
  100.             fragment_program_ref Fury/HeatVision/LightToHeat_fp
  101.             {
  102.                 // these should be *really* random!
  103.                 param_named random_fractions float4 0.3 0.7 0 0
  104.                 param_named depth_modulator float4 0.6 0 0 0
  105.                 // this one can be fixed
  106.                 param_named heatBiasScale float4 0.0 1.0 0 0
  107.             }
  108.             // INPUT (from scene, where entities has "Fury/HeatVision/Caster" material for heat emanation)
  109.             texture_unit
  110.             {
  111.                 tex_coord_set 0
  112.                 filtering linear linear none
  113.                 tex_address_mode clamp
  114.             }
  115.             // Noise map
  116.             texture_unit
  117.             {
  118.                 texture HeatNoise.tga
  119.                 tex_coord_set 0
  120.             }
  121.             // heat conversion texture
  122.             texture_unit
  123.             {
  124.                 texture HeatLookup.tga
  125.                 tex_coord_set 0
  126.                 filtering point point none
  127.             }
  128.         }
  129.     }
  130. }
  131. ///////////////////////////////////
  132. //   PASS 2
  133. //  BLUR PASS
  134. ///////////////////////////////////
  135. vertex_program Fury/HeatVision/Blur_vp cg
  136. {
  137.    source HeatVision.cg
  138.    entry_point Blur_vp
  139.    profiles vs_1_1 arbvp1
  140.     default_params
  141.     {
  142.         param_named_auto flipping render_target_flipping
  143.     }
  144. }
  145. fragment_program Fury/HeatVision/Blur_fp cg
  146. {
  147.    source HeatVision.cg
  148.    entry_point Blur_fp
  149.    profiles ps_2_0 arbfp1
  150. }
  151. material Fury/HeatVision/Blur
  152. {
  153.     technique
  154.     {
  155.         // pass 1
  156.         pass
  157.         {
  158. cull_hardware none
  159. cull_software none
  160. depth_func always_pass
  161.             vertex_program_ref Fury/HeatVision/Blur_vp
  162.             {
  163.             }
  164.             fragment_program_ref Fury/HeatVision/Blur_fp
  165.             {
  166.                 param_named blurAmount float4 0.5 0 0 0
  167.             }
  168.             // INPUT (from previous)
  169.             texture_unit
  170.             {
  171.                 texture Input
  172.                 tex_coord_set 0
  173.                 filtering linear linear none
  174.                 tex_address_mode clamp
  175.             }
  176.         }
  177.     }
  178. }