I’m trying to create a depth-dependent blur effect in post, using GLSL and the technique XML system that the other Post FX use.
My XML code is as follows (It’s located in bin/Data/PostProcess, and the GLSL code is located in bin/CoreData/Shaders/GLSL)
<renderpath>
<rendertarget name="dofblur" tag="DoF" sizedivisor="2 2" format="rgba" filter="true" />
<command type="quad" tag="DoF" vs="DepthOfFieldNew" ps="DepthOfFieldNew" output="dofblur">
<parameter name="BlurClamp" value="1.0" />
<parameter name="Bias" value="1.0" />
<parameter name="Focus" value="0.10" />
<texture unit="diffuse" name="viewport" />
</command>
<command type="quad" tag="DoF" vs="CopyFramebuffer" ps="CopyFramebuffer" output="viewport">
<texture unit="diffuse" name="dofblur" />
</command>
The GLSL code I’m currently trying to work with is taken from this post: Depth of Field glsl
Other Post-effects work fine when appended to the RenderPath I have currently, and I’m adding this technique in the exact same way in the C++ code, yet I get a black screen at runtime.
What am I doing wrong? Have I misunderstood RenderPath entirely?