Computes statistics for every slice of a texture. The fragment shader passed as an argument is executed once per slice. The shader is expected to return computed statistics as a color. tex is bound to texture id 0.

Namespace: VideoDVR
Assembly: VideoDVR (in VideoDVR.exe) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static Texture Compute(
	Texture tex,
	int numValues,
	IEnumerable<Shader> fragmentShaders,
	Action<ShaderProgram> configureCallback
)
Visual Basic
Public Shared Function Compute ( _
	tex As Texture, _
	numValues As Integer, _
	fragmentShaders As IEnumerable(Of Shader), _
	configureCallback As Action(Of ShaderProgram) _
) As Texture
Visual C++
public:
static Texture^ Compute(
	Texture^ tex, 
	int numValues, 
	IEnumerable<Shader^>^ fragmentShaders, 
	Action<ShaderProgram^>^ configureCallback
)

Parameters

tex
Type: Texture
The texture to analyze.
numValues
Type: System..::..Int32
The number of statistics that are computed. Determines the number of channels of the resulting texture. Must be betwen 1 and 4.
fragmentShaders
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'Shader>)>)>
A fragment shader that does the computation.
configureCallback
Type: System..::..Action<(Of <(<'ShaderProgram>)>)>
A callback method called after the shader program was set active. Must be used only for setting uniforms.

Return Value

A texture containing the results. The internal format is half-float with the number of channels based on numValues.

See Also