This is an extensive documentation for Svader, a JavaScript library that allows developers to render GPU-accelerated graphics in web applications. Here's a summary of the key points:
WebGL vs. WebGPU
Svader Features
resolution
, scale
, and time
.Svader Parameters
parameters
property is an array of objects with the following properties:
label
: The name of the parameter to be used for debugging.binding
: An integer matching the variable in the shader code.value
: The value of the parameter or a string specifying a built-in value. If not a built-in value, it should be an ArrayBuffer
/ArrayBufferView
.storage
: Optional, defaults to false
. Whether the parameter is a storage variable rather than a uniform variable.Svader Built-in Values
"resolution"
: A vec2f
of the canvas width and height in physical device pixels."scale"
: An f32
of the ratio between CSS pixels and physical device pixels, i.e., zoom level."time"
: An f32
of the current time in seconds."offset"
: A vec2f
to be added to the @builtin(position)
of the fragment shader.Svader Usage
parameters
property to pass parameters to the renderer.resolution
, scale
, and time
.Overall, Svader provides a powerful toolset for developers to render GPU-accelerated graphics in web applications. By understanding its features, parameters, and built-in values, developers can optimize their application's performance and create engaging user experiences.
SMS notifications for your application errors. Instant setup, easy usage.
Ranking the best cities for software engineers based on local salaries, tax rates, and cost of living. Find out how much more you could be making by m...
The All in one Fake API - Dummy data for your projects, fast and simple. Users, products, posts, comments and more