You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For array-based selector values, we currently assume that the values of the array are fixed and directly map the all elements of the array to generate shader variables. In practice, this means that if you want to dynamically reference elements of the array, extra logic and uniforms must be used to handle dynamic selection within the fragment shader. This is less-than-ideal for a number of reasons:
subject to 16 variable limit for texture definitions in the fragment shader
loading unused data onto GPU
requires some gymnastics with additional uniforms (see example)
We should consider undoing this assumption and updating the selector prop to accommodate this type of "mixed" selection.
Example of current integration
Consider an example where multiple variables (in this case multiple measures of the same variable, prec) can be averaged over area).
For array-based
selector
values, we currently assume that the values of the array are fixed and directly map the all elements of the array to generate shader variables. In practice, this means that if you want to dynamically reference elements of the array, extra logic and uniforms must be used to handle dynamic selection within the fragment shader. This is less-than-ideal for a number of reasons:We should consider undoing this assumption and updating the
selector
prop to accommodate this type of "mixed" selection.Example of current integration
Consider an example where multiple variables (in this case multiple measures of the same variable,
prec
) can be averaged overarea
).in
Map
definitionin fragment shader:
Potential integration
in
Map
definitionin fragment shader:
(no custom shader code for measure selection required,
prec
can be used directly)The text was updated successfully, but these errors were encountered: