Windows 3.1 VHS Shader

This shader recreates a retro low-resolution display effect inspired by early desktop systems such as Microsoft Windows 3.1, designed specifically for modern rendering in Godot 4.6.

It simulates pixelation by downscaling the screen to a fixed virtual resolution and enhances the effect with a subtle subpixel grid pattern, mimicking the structure of old LCD/CRT displays. The result is a clean and lightweight retro aesthetic, similar to early graphical interfaces, without heavy distortion or noise.

Fully customizable, this shader is ideal for retro UI, stylized games, or recreating classic computer visuals.

Shader code
shader_type canvas_item;
render_mode unshaded;

uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;

// Virtual resolution used for the pixelation effect
uniform vec2 virtual_resolution = vec2(640.0, 480.0);

// Strength of the LCD/subpixel grid effect
uniform float grid_strength : hint_range(0.0, 1.0) = 0.15;

// Grid frequency multiplier
uniform float grid_scale : hint_range(0.1, 10.0) = 1.0;

void fragment() {
	vec2 uv = SCREEN_UV;

	// Snap UVs to a low-resolution grid to create a pixelated look
	vec2 pixel_uv = floor(uv * virtual_resolution) / virtual_resolution;

	vec3 col = textureLod(screen_texture, pixel_uv, 0.0).rgb;

	// Subpixel/LCD-style horizontal grid
	float grid = 0.5 + 0.5 * sin(uv.x * virtual_resolution.x * 3.14159 * grid_scale);
	col *= mix(1.0, grid, grid_strength);

	COLOR = vec4(col, 1.0);
}
Live Preview
Tags
CRT, grid, LCD, low-resolution, pixelation, Post processing, retro, scanlines, screen, stylized
The shader code and all code snippets in this post are under MIT license and can be used freely. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

Related shaders

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments