27 #include "../shaders/WGEPropertyUniform.h"
28 #include "../shaders/WGEShaderPropertyDefineOptions.h"
30 #include "WGEPostprocessorEdgeEnhance.h"
34 "Edge detection filter to emphasize edges in complex geometry." )
41 "Edge detection filter to emphasize edges in complex geometry." )
44 WPropBool whiteEdge =
m_properties->addProperty(
"White Edge",
"If set, the edge is drawn in white instead of black.",
false );
45 WPropDouble edgeThresholdL =
m_properties->addProperty(
"Edge Lower Threshold",
"Define the edge threshold. Filters way \"weak\" edges.", 0.0 );
46 WPropDouble edgeThresholdU =
m_properties->addProperty(
"Edge Upper Threshold",
"Define the edge threshold. Filters way \"weak\" edges.", 1.0 );
47 edgeThresholdL->setMin( 0.0 );
48 edgeThresholdL->setMax( 1.0 );
49 edgeThresholdU->setMin( 0.0 );
50 edgeThresholdU->setMax( 1.0 );
54 s->setDefine(
"WGE_POSTPROCESSOR_EDGE" );
63 osg::ref_ptr< WGEOffscreenTexturePass > pass = offscreen->addTextureProcessingPass( s,
"Edge Detection" );
68 m_resultTextures.push_back( pass->attach( osg::Camera::COLOR_BUFFER0, GL_RGB ) );