hdr.material
资源名称:3dwind2.0.rar [点击查看]
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:7k
源码类别:
游戏引擎
开发平台:
Visual C++
- // Downsample a 2x2 area & turn into luminence (unclamped)
- fragment_program Ogre/Compositor/HDR/downscale2x2LuminenceHLSL_fp hlsl
- {
- source hdr.hlsl
- entry_point downscale2x2Luminence
- target ps_2_0
- }
- fragment_program Ogre/Compositor/HDR/downscale2x2LuminenceGLSL_fp glsl
- {
- source hdr_downscale2x2luminence.glsl
- default_params
- {
- param_named inRTT int 0
- }
- }
- material Ogre/Compositor/HDR/Downsample2x2Luminence
- {
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/downscale2x2LuminenceHLSL_fp
- {
- }
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- }
- }
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_GLSL_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/downscale2x2LuminenceGLSL_fp
- {
- }
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- }
- }
- }
- // Downsample a 3x3 area
- fragment_program Ogre/Compositor/HDR/downscale3x3HLSL_fp hlsl
- {
- source hdr.hlsl
- entry_point downscale3x3
- target ps_2_0
- }
- fragment_program Ogre/Compositor/HDR/downscale3x3GLSL_fp glsl
- {
- source hdr_downscale3x3.glsl
- default_params
- {
- param_named inRTT int 0
- }
- }
- material Ogre/Compositor/HDR/Downsample3x3
- {
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/downscale3x3HLSL_fp
- {
- }
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- }
- }
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_GLSL_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/downscale3x3GLSL_fp
- {
- }
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- }
- }
- }
- // Downsample a 3x3 area and perform a brightness filter pass
- fragment_program Ogre/Compositor/HDR/downscale3x3brightpassHLSL_fp hlsl
- {
- source hdr.hlsl
- entry_point downscale3x3brightpass
- target ps_2_0
- }
- fragment_program Ogre/Compositor/HDR/utils_fp glsl
- {
- source hdr_tonemap_util.glsl
- }
- fragment_program Ogre/Compositor/HDR/downscale3x3brightpassGLSL_fp glsl
- {
- source hdr_downscale3x3brightpass.glsl
- // re-use common functions
- attach Ogre/Compositor/HDR/utils_fp
- default_params
- {
- param_named inRTT int 0
- param_named inLum int 1
- }
- }
- material Ogre/Compositor/HDR/Downsample3x3Brightpass
- {
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/downscale3x3brightpassHLSL_fp
- {
- }
- // Scene
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- // Luminence
- texture_unit
- {
- tex_address_mode clamp
- filtering none
- }
- }
- }
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_GLSL_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/downscale3x3brightpassGLSL_fp
- {
- }
- // Scene
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- // Luminence
- texture_unit
- {
- tex_address_mode clamp
- filtering none
- }
- }
- }
- }
- // Bloom an area using gaussian distribution
- fragment_program Ogre/Compositor/HDR/bloomHLSL_fp hlsl
- {
- source hdr.hlsl
- entry_point bloom
- target ps_2_0
- }
- fragment_program Ogre/Compositor/HDR/bloomGLSL_fp glsl
- {
- source hdr_bloom.glsl
- default_params
- {
- param_named inRTT int 0
- }
- }
- material Ogre/Compositor/HDR/GaussianBloom0
- {
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/bloomHLSL_fp
- {
- }
- // Input
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- }
- }
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_GLSL_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/bloomGLSL_fp
- {
- }
- // Input
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- }
- }
- }
- material Ogre/Compositor/HDR/GaussianBloom1
- {
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/bloomHLSL_fp
- {
- }
- // Input
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- }
- }
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_GLSL_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/bloomGLSL_fp
- {
- }
- // Input
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- filtering none
- }
- }
- }
- }
- // Perform final tone mapping
- fragment_program Ogre/Compositor/HDR/finaltonemappingHLSL_fp hlsl
- {
- source hdr.hlsl
- entry_point finalToneMapping
- target ps_2_0
- }
- fragment_program Ogre/Compositor/HDR/finaltonemappingGLSL_fp glsl
- {
- source hdr_finalToneMapping.glsl
- // re-use common functions
- attach Ogre/Compositor/HDR/utils_fp
- default_params
- {
- param_named inRTT int 0
- param_named inBloom int 1
- param_named inLum int 2
- }
- }
- material Ogre/Compositor/HDR/ToneMapping
- {
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/finaltonemappingHLSL_fp
- {
- }
- // Scene
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- }
- // Bloom
- texture_unit
- {
- tex_address_mode clamp
- }
- // Luminence
- texture_unit
- {
- tex_address_mode clamp
- }
- }
- }
- technique
- {
- pass
- {
- cull_hardware none
- cull_software none
- depth_check off
- vertex_program_ref Ogre/Compositor/StdQuad_GLSL_vp
- {
- }
- fragment_program_ref Ogre/Compositor/HDR/finaltonemappingGLSL_fp
- {
- }
- // Scene
- texture_unit
- {
- tex_coord_set 0
- tex_address_mode clamp
- }
- // Bloom
- texture_unit
- {
- tex_address_mode clamp
- }
- // Luminence
- texture_unit
- {
- tex_address_mode clamp
- }
- }
- }
- }