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
We should store raster sprite images in the style png in a section after the point, line, and area regions so that style rules can use sprites for background and foreground images.
One way this could be implemented is to store the image coordinates as the first section and those coordinates can be fed to texture2D(). This way you can perform two texture2D()s in the vertex shader for the given feature to load a sprite by its index, and then load the relevant pixel for the fragment shader based on other rules.
This example uses integer pixel coordinates (in big endian), but we might also consider half floats (in whatever endian).
When a feature uses a sprite (or multiple sprites), it references the sprite by its index in the coordinate section plus a mode (repeat, center, ...). The modes may have additional parameters, such as an offset (x,y) or even rotations that are static or follow the contours of a geometry.
The text was updated successfully, but these errors were encountered:
We should store raster sprite images in the style png in a section after the point, line, and area regions so that style rules can use sprites for background and foreground images.
One way this could be implemented is to store the image coordinates as the first section and those coordinates can be fed to
texture2D()
. This way you can perform twotexture2D()
s in the vertex shader for the given feature to load a sprite by its index, and then load the relevant pixel for the fragment shader based on other rules.Here is an example that specifies 3 images:
This example uses integer pixel coordinates (in big endian), but we might also consider half floats (in whatever endian).
When a feature uses a sprite (or multiple sprites), it references the sprite by its index in the coordinate section plus a mode (repeat, center, ...). The modes may have additional parameters, such as an offset
(x,y)
or even rotations that are static or follow the contours of a geometry.The text was updated successfully, but these errors were encountered: