For example, given the following uniforms declarations in a GLSL fragment program:

uniform

float

uScale

uniform

sampler2D

uTexture

uniform

vec2

uMagnitude

uniform

vec4

uColor

The corresponding Dart code to initialize these uniform values is as follows:

void

updateShader

FragmentShader

shader

Color

color

Image

image

shader

setFloat

23

);

// uScale

shader

setFloat

114

);

// uMagnitude x