Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::GaussianBlur Class Reference

1D Gaussian blur. More...

#include <GaussianBlur.h>

List of all members.

Public Types

enum  Direction { VERTICAL, HORIZONTAL }

Static Public Member Functions

static void apply (class RenderDevice *rd, const Texture::Ref &source, const Vector2 &direction=Vector2(1.0f, 0.0f), int N=17)
static void apply (class RenderDevice *rd, const Texture::Ref &source, const Vector2 &direction, int N, const Vector2 &destSize)


Detailed Description

1D Gaussian blur.

Call twice to produce a 2D blur.

Operates on the graphics card; this requires a RenderDevice. See G3D::gaussian for gaussian filter coefficients on the CPU.


Member Enumeration Documentation

Enumerator:
VERTICAL 
HORIZONTAL 


Member Function Documentation

static void G3D::GaussianBlur::apply ( class RenderDevice rd,
const Texture::Ref source,
const Vector2 direction = Vector2(1.0f, 0.0f),
int  N = 17 
) [static]

static void G3D::GaussianBlur::apply ( class RenderDevice rd,
const Texture::Ref source,
const Vector2 direction,
int  N,
const Vector2 destSize 
) [static]

Blurs the source to the current G3D::Framebuffer.

Assumes RenderDevice::push2D rendering mode is already set. Blurs the alpha channel the same as any color channel, however, you must have alphaWrite enabled to obtain that result.

2D blur is not directly supported because handling of the intermediate texture is different for Framebuffer and backbuffer rendering.

Parameters:
N Number of taps in the filter (filter kernel width)
direction Direction of the blur. For best results, use Vector2(1,0) and Vector(0,1).
destSize output dimensions


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:45 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo