diff --git a/RGB8LUT.png b/RGB8LUT.png new file mode 100644 index 0000000..b21519d Binary files /dev/null and b/RGB8LUT.png differ diff --git a/zscript/firetexture_m/ft_baseclass.zsc b/zscript/firetexture_m/ft_baseclass.zsc index 342c4de..0a60ea6 100644 --- a/zscript/firetexture_m/ft_baseclass.zsc +++ b/zscript/firetexture_m/ft_baseclass.zsc @@ -81,6 +81,10 @@ class FireTexture private Array sparks;// all the active sparks private bool bhasstars; // true if any sparks with type SPARK_Stars exist + private Shape2D blitter; // the shape used to map pixels to palette indices + private TextureID blittertx; // the texture used for mapping to the palette + private Vector2 blitterlut[256]; // for fast color uv matching + // parses a fire texture from a file static FireTexture Load( string path ) { @@ -207,9 +211,46 @@ class FireTexture void Render() { - // blit to canvas, one pixel at a time (oof) - for ( uint y=0; y