Documentation
¶
Index ¶
Constants ¶
const ( VertexName = "Vertex" FragmentName = "Fragment" )
Variables ¶
This section is empty.
Functions ¶
func Fragment ¶
Fragment returns p's fragment entry point as a Metal function named name, for a renderer's fragment shader to call, after the functions it reaches and the prelude:
float4 name(constant Uniforms& uniforms, texture2d<float> T0, ..., float4 position, ...varyings)
The uniforms parameter is left out when p has none, and there is a texture parameter for each of p's textures.
func UniformLanes ¶
UniformLanes returns, for each lane of p's uniforms (in order, columns of matrices, elements of arrays: Type.DwordCount of each), its offset in bytes in the struct Uniforms of Fragment, and the struct's size.
func UniformLayout ¶
UniformLayout returns where each of p's uniform variables lies in the struct Uniforms of Fragment, in bytes, and the struct's size, as Metal lays it out: a vector of 3 takes the room of 4, a matrix is its columns, and an array's elements are as far apart as their alignment makes them.
Types ¶
This section is empty.