DebugAppearance

Visualizes a vertex attribute by displaying it as a color for debugging.

Components for well-known unit-length vectors, i.e., normal, tangent, and bitangent, are scaled and biased from -1.0, 1.0 to (-1.0, 1.0).

const primitive = new Primitive({
geometryInstances : // ...
appearance : new DebugAppearance({
attributeName : 'normal'
})
});

See also

Constructors

Link copied to clipboard

Types

Link copied to clipboard

Properties

Link copied to clipboard

The name of the attribute being visualized.

Link copied to clipboard

When true, the geometry is expected to be closed.

Link copied to clipboard

The GLSL source code for the fragment shader. The full fragment shader source is built procedurally taking into account the DebugAppearance.material. Use DebugAppearance.getFragmentShaderSource to get the full source.

Link copied to clipboard

The GLSL datatype of the attribute being visualized.

Link copied to clipboard

This property is part of the Appearance interface, but is not used by DebugAppearance since a fully custom fragment shader is used.

Link copied to clipboard

The WebGL fixed-function state to use when rendering the geometry.

Link copied to clipboard

When true, the geometry is expected to appear translucent.

Link copied to clipboard

The GLSL source code for the vertex shader.

Functions

Link copied to clipboard

Returns the full GLSL fragment shader source, which for DebugAppearance is just DebugAppearance.fragmentShaderSource.

Link copied to clipboard

Creates a render state. This is not the final render state instance; instead, it can contain a subset of render state properties identical to the render state created in the context.

Link copied to clipboard

Determines if the geometry is translucent based on DebugAppearance.translucent.