Module tutorial

Source
Expand description

Shaders used in the contributor intro tutorial and in WASM tests.

Functions§

implicit_isosceles_vertex
Simple vertex shader with an implicit isosceles triangle.
passthru_fragment
Simple fragment shader that writes the input color to the output color.
slabbed_renderlet
This shader uses the instance_index as a slab id. The instance_index is the id of a PrimitiveDescriptor. The PrimitiveDescriptor contains an Array of Vertexs as its mesh, the Ids of a MaterialDescriptor and CameraDescriptor, and TRS transforms. The vertex_index is the index of a Vertex within the PrimitiveDescriptor’s vertices Array.
slabbed_vertices
This shader uses the instance_index as a slab Id. The instance_index is the Id of an Array of Vertexs. The vertex_index is the index of a Vertex within the Array.
slabbed_vertices_no_instance
This shader uses the vertex index as a slab Id. The Id is used to read the vertex from the slab. The vertex’s position and color are written to the output.