Shader module for AttractMode front end
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.
- Copy module files to
The shaders module provides a global variable
shadersDir containing the shaders directory path. This enables you to use the shaders as you wish.
You may optionally use the provided classes to make usage easier, and in some cases, set with default parameters. All classes utilize a public shader variable. This enables you to set some parameters outside of the defaults provided from the class.
// Load the Shader module fe.load_module("shader"); // Create your shaders local shaderBloom = Bloom(); // Create an object local surf = fe.add_surface(640, 480); // Apply shader surf.shader = shaderBloom.shader;
See module.nut for notes on parameters.
Bloom(); BloomMultipass(); Colorize(hue, saturation, lightness); CrtCgwg(); CrtLottes(); CrtLottesMultipass(); RoundCorners(radius, imageWidth, imageHeight, [subImgWidth], [subImgHeight]);
Bloom shader from here, modified by Chris Van Graas. Crt Lottes Shader and Bloom Multipass is by Timothy Lottes. Crt Cgwg is by Themaister and DOLLS. They were converted to work with AttractMode FE by Luke-Nukem, found in his crt-shader-theme.
Colorize and Desaturate shaders from here by zpaolo11x.
Round Corders Shader is by Oomek, and was shared on the AttractMode forum here.
All shaders were used here with permission. Thank you so much for your contribution. Including them in a module makes it easier to be included in a layout.
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.