Skip to main content

History: Outline.material

Source of version: 2 (current)

Copy to clipboard
            !Description
Like ((CelShading.material|CelShading.material)) this file does not provide a whole OGRE "material" but instead an abstract pass to use in your own material. You can modify the fixed-function pipeline value 'diffuse' to alter the color of the edge.

This pass comes with two floating-point variables: $edgeScale and $sinkScale.

!Code
{CODE(wrap="1", colors="c++")}//
// Optional pass for experimental edge outlining.
abstract pass OutlineExperiment
{
	//
	// Diffuse tweaks outline color.
	diffuse 0 0 0
	
	//
	// Multiplier for how far the black mesh protrusion is, for edge size.
	set $edgeScale 1
	
	//
	// Multiplier for how far the black edge mesh should be pushed back to reduce Z fighting.
	//
	// Best value is greater for large meshes and smaller for small meshes. You may have to
	// tweak this variable dramatically.
	set $sinkScale 1

	vertex_program_ref OutlineExperimentVP
	{
		param_named edgeScale float $edgeScale
		param_named sinkScale float $sinkScale
	}
}{CODE}