Skip to content

Implement easy way to modify the underlying SpriteList glsl program. #1872

@DragonMoffon

Description

@DragonMoffon

Currently, there is no easy way of subtly changing how SpriteLists render sprites. I propose we add new functionality that doesn't break backward compatibility.

There are two main reasons that it is difficult to override SpriteList's drawing functionality. Firstly the SpriteList offers methods for every value that it passes to the GPU, but if you want to add new ones, or remove any already provided you essentially cannot do this. This is because the assigning of values to the buffers is hard coded. Secondly, there is no easy access to the program for setting uniforms

There are many examples of special sprites that basically require a total rewrite of the SpriteList class for very little changes.

  • Billboarded Sprites (always face the camera no matter the orientation).
  • Emissive Sprites (Sprites which write to an extra buffer for glow effects).
  • Lights (They can be implemented using the Sprite interface with a few small tweaks)
  • Multi-Texture Sprites / Colour-Mask Sprites (Sprites which need two or more textures, or only want certain parts of their color changed e.g. Sprites with Team colors or Paintjobs )
  • etc. etc. etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions