style.color
v4
return
uniform vec3 styleColor; uniform float styleOpacity; vec4 getStyleColor() { return vec4(styleColor, styleOpacity); }
Isolate
v4
return
Callback
(v4,v4)→(v4)
callback
screen.map.xy
v4
uvwo
v4
stpq
v4
return
uniform vec2 remapUVScale; vec4 screenMapXY(vec4 uvwo, vec4 stpq) { return vec4(floor(remapUVScale * uvwo.xy), 0.0, 0.0); }
Isolate
v4
_io_78_xyzw
v4
return
resample.padding
v4
xyzw
v4
return
uniform vec4 resampleBias; vec4 resamplePadding(vec4 xyzw) { return xyzw + resampleBias; }
Callback
(v3)→(v4)
callback
extendVec
v3
v
v4
return
vec4 extendVec(vec3 v) { return vec4(v,0.0); }
Isolate
v4
_io_85_xyzw
v4
return
map.xyzw.2dv
v4
xyzw
v2
xy
f
z
void mapXyzw2DV(vec4 xyzw, out vec2 xy, out float z) { xy = xyzw.xy; z = xyzw.z; }
map.2d.data
v2
xy
v2
return
uniform vec2 dataResolution; uniform vec2 dataPointer; vec2 map2DData(vec2 xy) { return (xy + dataPointer) * dataResolution; }
sample2DArray
v2
uv
f
z
v4
return
uniform sampler2D dataTextures[4]; vec4 sample2DArray(vec2 uv, float z) { if (z < 1.5) { if (z < 0.5) { return texture2D(dataTextures[0], uv); } else { return texture2D(dataTextures[1], uv); } } else { if (z < 2.5) { return texture2D(dataTextures[2], uv); } else { return texture2D(dataTextures[3], uv); } } }
truncateVec
v4
v
v3
return
vec3 truncateVec(vec4 v) { return v.xyz; }
Isolate
v3
_io_97_xyz
(v3)→(v4)
_io_98_getSample
v4
return
getFramesSample
v3
xyz
(v3)→(v4)
getSample
v4
return
uniform vec3 dataResolution; uniform vec3 dataSize; uniform float cosine; uniform float sine; vec4 getSample(vec3 xyz); vec4 getFramesSample(vec3 xyz) { vec2 pos = xyz.xy * dataResolution.xy - .5; pos = ((pos * dataSize.xy) * mat2(cosine, sine, -sine, cosine) * .999) / dataSize.xy; xyz.xy = (pos + .5) * dataSize.xy; vec4 c = getSample(xyz + vec3( 0.0, 0.0, 1.0)); vec3 t = getSample(xyz + vec3( 0.0, 1.5, 0.0)).xyz; vec3 b = getSample(xyz + vec3( 0.0,-1.5, 0.0)).xyz; vec3 l = getSample(xyz + vec3(-1.5, 0.0, 0.0)).xyz; vec3 r = getSample(xyz + vec3( 1.5, 0.0, 0.0)).xyz; return vec4((t + b + l + r) / 2.0 - c.xyz, c.w); }
color.opaque
v4
color
v4
return
vec4 opaqueColor(vec4 color) { return vec4(color.rgb, 1.0); }
mesh.fragment.map
(v4,v4)→(v4)
getSample
v4
return
#define POSITION_UV //---------------------------------------- #ifdef POSITION_STPQ varying vec4 vSTPQ; #endif #ifdef POSITION_U varying float vU; #endif #ifdef POSITION_UV varying vec2 vUV; #endif #ifdef POSITION_UVW varying vec3 vUVW; #endif #ifdef POSITION_UVWO varying vec4 vUVWO; #endif vec4 getSample(vec4 uvwo, vec4 stpq); vec4 getMapColor() { #ifdef POSITION_STPQ vec4 stpq = vSTPQ; #else vec4 stpq = vec4(0.0); #endif #ifdef POSITION_U vec4 uvwo = vec4(vU, 0.0, 0.0, 0.0); #endif #ifdef POSITION_UV vec4 uvwo = vec4(vUV, 0.0, 0.0); #endif #ifdef POSITION_UVW vec4 uvwo = vec4(vUVW, 0.0); #endif #ifdef POSITION_UVWO vec4 uvwo = vec4(vUVWO); #endif return getSample(uvwo, stpq); }
binaryOperator
v4
a
v4
b
v4
return
vec4 binaryOperator(vec4 a, vec4 b) { return a * b; }
fragment.color
v4
color
void setFragmentColor(vec4 color) { gl_FragColor = color; }