> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summerengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Paint_projection (Painted 25d world skill)

> paint_projection.gdshader from the Painted 25d world skill in the Summer Engine skill library. Build a 2D or 2.5D game as a painted world: a 3D blockout under one fixed camera, an AI paint-over projected onto it, sprite characters.

> [!NOTE]
>
> Part of the [`painted-25d-world` skill](/skills/painted-25d-world). The skill links here when your agent needs the detail.

```glsl paint_projection.gdshader theme={null}
// Projects one painted picture onto every mesh that uses this material, from the fixed paint camera.
// UV = where the surface point sits in the paint camera's orthographic frame, so no mesh needs UVs.
// Unshaded: the painting already holds all the light. Keep the scene tonemap Linear, exposure 1.
shader_type spatial;
render_mode unshaded, cull_disabled, shadows_disabled;

uniform sampler2D paint : source_color, filter_linear_mipmap_anisotropic, repeat_disable;
uniform vec3 paint_origin;      // PaintCamera.global_position
uniform vec3 paint_right;       // PaintCamera.global_basis.x
uniform vec3 paint_up;          // PaintCamera.global_basis.y
uniform vec2 paint_size;        // frame width, height in metres (Camera3D.size with KEEP_WIDTH, height = width * H / W)

varying vec3 world_pos;

void vertex() {
	world_pos = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz;
}

void fragment() {
	vec3 d = world_pos - paint_origin;
	vec2 uv = vec2(dot(d, paint_right) / paint_size.x + 0.5, 0.5 - dot(d, paint_up) / paint_size.y);
	ALBEDO = texture(paint, uv).rgb;
}
```

***

Source: [`library/skills/painted-25d-world/_building-blocks/paint_projection.gdshader`](https://github.com/SummerEngine/summer/blob/main/library/skills/painted-25d-world/_building-blocks/paint_projection.gdshader), rendered from `summer-engine@4.5.0` on npm.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.