Version 2 released
Huge overhaul of entire system and shader. Old setup did not work correctly with GMS2 and was long overdue for an update.
An update of the old version for GMS1.4 version can be found here https://www.dropbox.com/s/tfnjtnq4p0g4uw4/CRT_Pixel_Shader.gmz?dl=0
This shader is aimed to replicate how an old CRT monitor would look, this method is currently used in most emulators eg: MAME, RetroArch, Snes9x, Project64...etc etc.
What can this shader do?
You may use any of these shaders in your game(s), paid or free. eg: GameJolt, Steam, own website are permitted. You may not redistribute any of the shaders/examples on the Yoyogames Marketplace, paid or free as projects, extensions, shaders, etc are not permitted.
RECOMMENDED CAMERA AND VIEW SETTING (not mandatory)
Setting up the cameras view of the world. Common retro console resolutions
3rd Gen Atari 7800 = 160×200 or 320×200 NES = 256×224 or 256×240 Mater System = 256×192, 256×224, 256×240
4th Gen TurboGrafx-16 = 256×224 to 565×242 (progressive), 256×448 to 565×484 (interlaced) SNES = 256×224 to 256×239 (progressive), 512×448 to 512×478 (interlaced) Mega Drive/Genesis = 256×224 to 320×240 (progressive), 320×448 to 320×480 (interlaced)
5th Gen PlayStation = 256×224 to 640×240 (progressive), 256×448 to 640×480 (interlaced) Nintendo 64 = 320×240 to 720×288 (progressive), 320×480 to 720×576 (interlaced)
To avoid "moire pattern" when using radial distortion and scaling the image.
If you're using a low resolution camera, set the viewport to be 2x or 3x the camera view size (when practical).
Keep same aspect ratio as camera view eg: 4:3 or 16:9 etc.
Trying to scale from 4:3 camera to 16:9 view, will work however, results may not be ideal.
Same when going full screen. Even if you setup everything here as 4:3, if you change to full screen and the monitor is eg: 16:9 then the distortion and RGB separation will look strange.
End User Licence Agreement (EULA).
Fixed issue with Boolean if statements when using HTML5
Huge overhaul of entire system and shader. Old setup did not work correct with GMS2 and was long overdue for an update.
Fixes * View scaling * Full screen * Code comments
New features * All new and existing attributes are now customizable and optional. * GUI bezel * Turn on/off effect * Noise * Faster and easier to add to existing projects * Brightness
Setting up the cameras view of the world. Common retro console resolutions
3rd Gen Atari 7800 = 160×200 or 320×200 NES = 256×224 or 256×240 Mater System = 256×192, 256×224, 256×240
4th Gen TurboGrafx-16 = 256×224 to 565×242 (progressive), 256×448 to 565×484 (interlaced) SNES = 256×224 to 256×239 (progressive), 512×448 to 512×478 (interlaced) Mega Drive/Genesis = 256×224 to 320×240 (progressive), 320×448 to 320×480 (interlaced)
5th Gen PlayStation = 256×224 to 640×240 (progressive), 256×448 to 640×480 (interlaced) Nintendo 64 = 320×240 to 720×288 (progressive), 320×480 to 720×576 (interlaced)
RECOMMENDED CAMERA AND VIEW SETTING (not mandatory) To avoid "moire pattern" when using radial distortion and scaling the image.
If you're using a low resolution camera, set the viewport to be 2x or 3x the camera view size (when practical).
Keep same aspect ratio as camera view eg: 4:3 or 16:9 etc.
Trying to scale from 4:3 camera to 16:9 view, will work however, results may not be ideal.
Same when going full screen. Even if you setup everything here as 4:3, if you change to full screen and the monitor is eg: 16:9 then the distortion and RGB separation will look strange.