No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
keilmillerjr Added rotated param
Signed-off-by: Keil Miller Jr <>
Latest commit c20c71c Aug 20, 2017
Failed to load latest commit information.
.gitignore My first commit Feb 22, 2017
CRT-lottes.vsh My first commit Feb 22, 2017
CRT-lottes_rgb32_dir.fsh Added rotated param Aug 20, 2017
RoundCorners.fsh Addition of RoundCorners Apr 15, 2017

Shader module for AttractMode front end

by Keil Miller Jr


Shader module is for the AttractMode front end. It can assist you in easily using shaders for layout design.


You may need to change file paths as necessary as each platform (windows, mac, linux) has a slightly different directory structure.

Install Files

  1. Copy module files to $HOME/.attract/modules/Shader/


From within your layout, you can load the module.


// Create Artwork Variable
local snap = fe.add_artwork("snap", 0, 0, 640, 480);

// Load Shader Module
if (fe.load_module("shader")) {
  // CrtLottes
  local snapShader = CrtLottes();
  // RoundCorners
  if (snap.preserve_aspect_ratio) RoundCorners(100, snap.width, snap.height);
  else RoundCorners(100, snap.width, snap.height, snap.subimg_width, snap.subimg_height);
  // Apply the shader to your object
  snap.shader = snapShader.shader;

Optional Params

See module.nut for notes on acceptable variables and public class functions to change other params.

CrtLottes(width, height, curvature, aperature, vertex, fragment);
RoundCorners(radius, snapWidth, snapHeight, snapSubImgWidth, snapSubImgHeight);


Crt Lottes Shader is by Timothy Lottes. It was converted to MAME and AttractMode FE by Luke-Nukem found here. It has been slightly modified to allow for changes to some constants such as curvature.

Round Corders Shader is by Oomek, and was shared on the AttractMode forum here.

More functionality is expected as it meets my needs. If you have an idea of something to add that might benefit a wide range of layout developers, please join the AttractMode forum and send me a message.