I have a problem with compositor script for Gazebo. I want to impement deep of field effect and that kind of effect require shader with 2 passes. First pass return depth map which is second pass input. Second pass should transform output from other compositor based on depth map. I tried to write this myself and I found some samples of DOF effect shader in glsl language but I don't know how to write compositor configuration script:( Below is my code but it doen't work. Can you help me?
Code: Select all
compositor CameraNoise/DOF
{
technique
{
// Temporary textures
texture rt0 target_width target_height PF_A8R8G8B8
texture DT target_width target_height PF_A8R8G8B8
target rt0
{
// Render output from previous compositor (or original scene)
input previous
}
target rt1
{
// Start with clear output
input none
// Draw a fullscreen quad with noise
pass render_quad
{
// Renders a fullscreen quad with a material
material Gazebo/DOFDepthMapCamera
input 0 rt1
}
}
target_output
{
// Start with clear output
input none
// Draw a fullscreen quad with noise
pass render_quad
{
// Renders a fullscreen quad with a material
material Gazebo/DOFCamera
input 0 rt0 rt1
}
}
}
}
Oskar