随笔 - 505  文章 - 1034  trackbacks - 0
<2008年5月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567


子曾经曰过:编程无他,唯手熟尔!

常用链接

留言簿(94)

随笔分类(649)

随笔档案(505)

相册

BCB

Crytek

  • crymod
  • Crytek's Offical Modding Portal

Game Industry

OGRE

other

Programmers

Qt

WOW Stuff

搜索

  •  

积分与排名

  • 积分 - 893949
  • 排名 - 14

最新随笔

最新评论

阅读排行榜

评论排行榜


没有任何效果的截图:




参考《Pro OGRE 3D Programming》Chapter 12: Ogre 2D and Compositing

HDR效果截图,注意fps数的变化,相当大啊:



ogrenew\Samples\Media\materials\scripts\Examples.compositor文件中
 
HDR

除了rt_full,每个target都有对应的一个material脚本

// HDR
compositor HDR
{
    
// floating point only for now
    technique
    {
        
// Temporary textures
        
// Fullsize HDR render target, used as tone mapping source
        texture rt_full target_width target_height PF_FLOAT16_RGB
        
// Targets used for luminance evaluation (3x3 downsample, point filtering)
        texture rt_lum0 1 1 PF_FLOAT16_RGB
        texture rt_lum1 
4 4 PF_FLOAT16_RGB
        texture rt_lum2 
16 16 PF_FLOAT16_RGB
        texture rt_lum3 
64 64 PF_FLOAT16_RGB
        texture rt_lum4 
128 128 PF_FLOAT16_RGB
        
// Bright-pass filtered target (tone mapped)
        texture rt_brightpass 128 128 PF_R8G8B8
        
// Bloom filter targets
        texture rt_bloom0 128 128 PF_R8G8B8
        texture rt_bloom1 
128 128 PF_R8G8B8


        target rt_full
        {
            
// No input, render differently
            input none

            
// Use float target HDR material scheme (unclamped shaders)
            material_scheme HDR

            pass clear
            {
            }

            pass render_scene
            {
            }

        }

        
// Downsample the original HDR scene to extract luminence value
        target rt_lum4
        {
            input none
            pass render_quad // hew:告诉渲染器把这个通路渲染到整个目标矩形区域中来
                             // hew:instruct the Compositor to render this pass to a full-target quad
            {
                
// Downsample using a 2x2 filter and convert to greyscale
                material Ogre/Compositor/HDR/Downsample2x2Luminence
                input 
0 rt_full
                identifier 
994
            }
        }
        target rt_lum3
        {
            input none
            pass render_quad
            {
                
// Downsample using a 3x3 filter
                material Ogre/Compositor/HDR/Downsample3x3
                input 
0 rt_lum4
                identifier 
993
            }
        }
        target rt_lum2
        {
            input none
            pass render_quad
            {
                
// Downsample using a 3x3 filter
                material Ogre/Compositor/HDR/Downsample3x3
                input 
0 rt_lum3
                identifier 
992
            }
        }
        target rt_lum1
        {
            input none
            pass render_quad
            {
                
// Downsample using a 3x3 filter
                material Ogre/Compositor/HDR/Downsample3x3
                input 
0 rt_lum2
                identifier 
991
            }
        }
        target rt_lum0
        {
            input none
            pass render_quad
            {
                
// Downsample using a 3x3 filter
                material Ogre/Compositor/HDR/Downsample3x3
                input 
0 rt_lum1
                identifier 
990
            }
        }


        target rt_brightpass
        {
            input none
            pass render_quad
            {
                
// Downsample using a 3x3 filter, hi-pass and tone map
                material Ogre/Compositor/HDR/Downsample3x3Brightpass
                input 
0 rt_full
                input 
1 rt_lum0
                identifier 
800
            }
        }

        target rt_bloom1
        {
            input none
            pass render_quad
            {
                
// Blur horizontally
                material Ogre/Compositor/HDR/GaussianBloom
                input 
0 rt_brightpass
                identifier 
701
            }
        }
        target rt_bloom0
        {
            input none
            pass render_quad
            {
                
// Blur horizontally
                material Ogre/Compositor/HDR/GaussianBloom
                input 
0 rt_bloom1
                identifier 
700
            }
        }


        
// Final output combines tone mapping of the original scene, with an
        
// exposure setting passed in as a GPU parameter, and an additive bloom
        
// effect
        target_output
        {
            input none
            pass render_quad
            {
                material Ogre
/Compositor/HDR/ToneMapping
                input 
0 rt_full
                input 
1 rt_bloom0
                input 
2 rt_lum0
            }
        }


    }

}


看完了书上的介绍还是很迷糊

DxSDK里面有个HDRPipeline的例子,结合那个看看


posted on 2008-05-04 22:50 七星重剑 阅读(3669) 评论(4)  编辑 收藏 引用 所属分类: Game GraphicsGame EngineOGRE

FeedBack:
# re: 每天花30分钟看OGRE--(10) Demo_Compositor 2008-05-05 02:20 放屁阿狗
ogre我也开始琢磨了  回复  更多评论
  
# re: 每天花30分钟看OGRE--(10) Demo_Compositor 2008-05-05 12:18 七星重剑
@放屁阿狗
一起琢磨 :)  回复  更多评论
  
# re: 每天花30分钟看OGRE--(10) Demo_Compositor[未登录] 2008-06-16 18:22 flyswift
呵呵,每天30分钟,只要天天坚持,一定会成功  回复  更多评论
  
# re: 每天花30分钟看OGRE--(10) Demo_Compositor 2009-08-22 15:49 FreeWork
找到一份OfusionPro的中文破解版,谁能下载了共享一下啊。 http://www.filefactory.com/file/ah28hd1/n/_OfusionPro_7z  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理