Two optimized shaders for creating convincing 3D interior illusions using 2D texture atlases. Perfect for optimizing mass buildings and adding interior detail to distant objects.
Link: Fake 3D Interior Projection Shader (Fixed & Tuned)
A pre-calibrated version with optimized offsets and scales for standard texture templates. Perfect for quick setup.
Features:
- Pre-tuned offsets & scales for all 6 faces
- Brightness control (0.0-4.0 range)
- Fixed UV calculations and texture clamping
- Optimized ray-box intersection
- Ready-to-use with included texture templates
Best for: Quick setup, game jams, standard building interiors
Link: Fake 3D Interior Projection Shader (Adjustable)
A fully configurable version with exposed parameters for each face. Perfect for custom interiors.
Features:
- Exposed
face_offset[6]andface_size[6]uniforms - Brightness control (0.0-4.0 range)
- Independent control over each face
- Reference values for easy setup
- Ultimate flexibility for custom atlas layouts
Best for: Custom interiors, varied building designs, advanced users
- Apply to:
MeshInstance3D(Recommended:QuadMeshorPlaneMesh) - Adjust Z-scale to control interior depth (higher = deeper rooms)
- Use included texture templates for consistent results
- Set brightness to match your scene lighting
- Format: 6-face atlas texture
- Layout: Standard grid-based organization
- Templates: Provided with marker guides for easy editing
- Main Albedo Texture: FINAL_TEST.png - Primary wall texture for the shader
If you're using the adjustable shader, start with these tested values:
- Index 0 (+X face):
-0.340, 0.75 - Index 1 (-X face):
-0.675, -0.75 - Index 2 (+Y face):
0.1775, -0.5 - Index 3 (-Y face):
0.1775, 0.5 - Index 4 (+Z face):
0.0, 0.0 - Index 5 (-Z face):
0.515, -0.25
- Index 0 (+X face):
1.35, 1.0 - Index 1 (-X face):
1.35, 1.0 - Index 2 (+Y face):
0.65, 2.0 - Index 3 (-Y face):
0.65, 2.0 - Index 4 (+Z face):
1.0, 1.0 - Index 5 (-Z face):
0.65, 1.0
- Use on
QuadMeshinstead ofCubeMeshfor distant buildings - Single shader can replace hundreds of detailed interior meshes
- Works great with Level of Detail (LOD) systems
- Bake lighting into your atlas textures
- Use higher resolution atlases for foreground buildings
- Combine with decals for additional details
- Animate brightness for day/night cycles
- City skylines with lit windows at night
- Space station interior views
- Dungeon/castle window details
- Sci-fi spaceship interior glimpses
- Render Mode: Unshaded (full appearance control)
- Algorithm: Ray-box intersection with per-face UV mapping
- Compatibility: Godot 4.0+ (spatial shader)
- Performance: Extremely lightweight - suitable for hundreds of instances
- Fixed UV calculation and face detection
- Added texture clamping to prevent artifacts
- Corrected axes flipping for proper orientation
- Added brightness control parameter
- Optimized for production use
- Shader 1 (Tuned): Fake 3D Interior Projection Shader Fixed & Tuned Link
- Shader 2 (Adjustable): Fake 3D Interior Projection Shader Fixed & Adjustable Link
- Main Albedo Texture: FINAL_TEST.png
- Texture Templates: Included in download
- License: MIT License
- Based on: "Interior mapping shader" by AndreaTerenz (September 6, 2022)
MIT License - Free for personal and commercial use. See LICENSE file for full details.
- Original Concept: AndreaTerenz
- Optimization & Fixes: Lord0San
Perfect for game developers, architects, and anyone needing performant interior details without the performance cost.