fieldplay/API.md
anvaka 090d38b0a0 updating link to shaderific
Looks like the domain was bought and no longer hosts documentation
2022-05-10 21:57:30 -07:00

713 B

List of variables available to shader

On top of standard glsl functions, the following list of variables can be used in velocity shader:

  • float PI - 3.1415926535897932384626433832795
  • float frame - Current frame number. Increases over time. Resets to 0 if you change shader's code
  • vec4 cursor - Defines position of a cursor in bounding box coordinates. cursor.xy - position where mouse was clicked (or tapped) last time. cursor.zw - current mouse hover position. On mobile phones, where mouse is not available, zw component will be the xy of touchmove event.