Screenspace Tiled Texturing

A way to mimic textured animation, “the Chowder effect”, or “the Gankutsuou effect”. It applies a texture that looks uniform across the entire screen. While 3D objects with this shader move, the assigned texture is stationary and flat.

This also works great if you’re applying a shaded dithering effect to a model, as seen in the Tony Hawk GBA games.

What this shader can’t do is turn an already-opaque texture into a transparent one. My hope is to iterate on this to achieve an impressionable transparent dithering effect for models.

Shader code
shader_type spatial;
render_mode unshaded;
// Renders a tileable 2D texture to screen, using spatial polygons as a mask.
// Remove blur from textures by unchecking "Detect 3D" and "Filter" in Import.
// Demo: https://github.com/DeerTears/Polygon-Mask-for-2D-Textures/

uniform sampler2D tiling_texture;

uniform float tiling_scale = 1.0;

const float DEFAULT_SCALE = 8.0;

void fragment() {
	vec2 uv = FRAGCOORD.xy;
	vec2 tiling_uv = uv / (DEFAULT_SCALE * tiling_scale * -1.0);
	vec4 texture_result = texture(tiling_texture, tiling_uv);
	ALBEDO = texture_result.rgb;
	ALPHA = texture_result.a;
}
Tags
chowder, gankutsuou, screen, space, tiling, uv
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

Related shaders

Simple tiled texture scroll

Tiled texture inside of mask

Depth-based Edge Detection with Sobel Operator – Screenspace

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments