Module shaders

Module shaders 

Source

Constants§

FXAA
Fragment shader to smooth the harsh edges of a render. see fxaa_shader()
SCREEN_VERTEX
Vertex shader that doesnt change position or uvs. takes in Vertex and TextureCoords and outputs uv. Intended for use with the screen mesh to draw over the screen. e.g. with the fxaa shader.
VERTEX
simple vertex shader. uniform requires model: Mat4, perspective: Mat4 (use Mat4::view_matrix_3d() for 3d or Mat4::view_matrix_2d() for 2d/orthographic) and camera: Mat4 (inverse camera matrix. use Mat4::from_inverse_transform() or call .inverse() before feeding the matrix into to the shader)

Functions§

fxaa_shader
A shader for smoothing jaggerd pixel edges. Use with fxaa_uniforms with the input of a texture. (check simple-fxaa example)
fxaa_uniforms
Takes the render results texture and gives the appropiate fxaa uniform values. Use with the fxaa shader.