OGRE Demo_Compositor
来源:互联网 发布:windows 10 iplaysoft 编辑:程序博客网 时间:2024/05/16 18:22
转自:http://blog.csdn.net/pizi0475/article/details/5389428
没有任何效果的截图:
参考《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
}
}
}
}
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的例子,结合那个看看
- OGRE Demo_Compositor
- OGRE Demo_Compositor
- 关于Demo_Compositor 例子的分析
- Ogre
- ogre
- OGRE
- OGRE
- ogre
- OGRE
- ogre
- OGRE乱记二
- OGRE乱记三
- 关于OGRE
- 学习OGRE~~
- Ogre介绍
- Ogre网站
- ogre+mfc
- 学习Ogre
- 从一个layout id创建各个tab页
- 宏碁Aspire 5749德国开售 MeeGo系统搭配Sandy Bridge CPU
- 动态创建一个view来做为tab页的内容
- 传递一个intent来传递参数,并以新启动的activity做为tab页的内容,这个应该是比较方便传递参数的
- 12章(一)Java流与文件操作
- OGRE Demo_Compositor
- A problem with my meal
- 12章(二)Java流与文件操作
- Ogre 合成器(Compositor)脚本
- 12章(三)Java流与文件操作
- javascript 正则表达式
- OGRE Demo_Dot3Bump
- Android 数据存储之preference
- 12章(四)Java流与文件操作