I've just come up with an idea of how to make a phosphor retention effect in Attract Mode by accident during my experiments.
It's possible by exploiting the one frame delay of surfaces and making a feedback loop between 2 surfaces.
Maybe someone will find a use for it.
layout.nut
local flw = fe.layout.width
local flh = fe.layout.height
local su = []
local sh = []
local width = flw /2.0
local height = flh /1.0
local retention = 0.95
su.push( fe.add_surface( width, height ))
su.push( fe.add_surface( width, height ))
local snap = su[0].add_artwork("snap", 0, 0, width, height )
sh.push( fe.add_shader( Shader.Fragment, "shader.frag" ))
sh.push( fe.add_shader( Shader.Fragment, "shader.frag" ))
snap = su[1].add_clone( snap )
sh[0].set_texture_param( "texold", su[0] )
sh[0].set_param( "retention", retention )
snap.shader = sh[0]
snap = su[0].add_clone( snap )
sh[1].set_texture_param( "texold", su[1] )
sh[1].set_param( "retention", retention )
snap.shader = sh[1]
su[0].set_pos( flw / 2.0, flh / 2.0 )
su[0].origin_x = su[0].width / 2.0
su[0].origin_y = su[0].height / 2.0
su[1].visible = false
shader.frag
uniform sampler2D texture;
uniform sampler2D texold;
uniform float retention;
void main()
{
vec4 pixel;
vec4 pixelold;
vec2 uv = gl_TexCoord[0];
vec2 uvo = gl_TexCoord[0];
uvo.y = 1.0 - uvo.y;
pixel = texture2D( texture, uv );
pixelold = texture2D( texold, uvo );
pixel = max( pixel, pixelold * retention );
gl_FragColor = gl_Color * pixel;
}