Ogre Version: 14.1.0
Operating System: Windows 10
Render System: Direct3D11
Code: Select all
compositor GrayScale
{
technique
{
texture rt0 target_width target_height PF_FLOAT32_RGBA
texture rt1 target_width target_height PF_FLOAT32_RGBA
target rt0
{
//After drawing geometries.
input previous
}
target rt1
{
//For example, I want to implements color-gray convertion with compute shader
input none
pass compute
{
material ComputeShader/GrayScale
thread_groups 32 32 1
input 0 rt0
input 1 rt1
}
}
target_output
{
input none
pass render_quad
{
//simply draw quad.
material RenderQuad
input 0 rt1
}
}
}
}
I want to implements post effect with direct3d11 compute shader.
And I read Sample_Compute example.
However I cannot understand how to write compositor to execute post effect with compute shader.
In the example above, I would like to perform Gaussian blur or grayscale conversion etc... after drawing other geometry. It is possible with the traditional Compositor example, but I'd like to know how to implements it with Compute Shader.
Best regards.