Skip to content

DebugShaders

Johannes Deml edited this page Oct 14, 2019 · 3 revisions

Debug Shaders

The Debug Shaders in Configurable Shaders are meant to help checking properties of Meshes as well as documenting shader functionality through examples.

World Normal Shader (Source)

Configurable/Debug/WorldNormals

WorldNormal Demo

This shader shows the normal data of an mesh, represented in world space. It is meant as an easy way to check if the normals of a mesh are as expected.

Depth01 Shader (Source)

Configurable/Debug/Depth01

Depth01 Demo Depth01 Material Mapping

This Shader visualized the depth information of a mesh normalized in the near-far clipping planes of the camera. The shader allows remapping the relative range in order to support drawing more subtle depth changes in a subset of the camera frustum.

  • Near Clipping Plane distance = White
  • Far Clipping Plane distance = Black

The near/far clipping plane of hte game view camera is used, so the material will most probably show up as black in the scene view.

Properties

Depth01 Material

  • Invert Depth: Invert the depth color so near objects get white and far objects get black.
  • Remap Depth: Change the color spectrum for black to white to a subset of the near far clipping plane.
Clone this wiki locally