<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-i-implemented-shadows-in-my-game-engine-e0k6jfu8v" -->

---
title: How I Implemented Shadows in my Game Engine | daily.dev
description: A developer shares how they implemented shadow mapping in their custom game engine for a casual farming game. The post covers the core shadow mapping technique...
canonical: https://daily.dev/posts/how-i-implemented-shadows-in-my-game-engine-e0k6jfu8v
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How I Implemented Shadows in my Game Engine | daily.dev
og:description: A developer shares how they implemented shadow mapping in their custom game engine for a casual farming game. The post covers the core shadow mapping technique...
og:url: https://daily.dev/posts/how-i-implemented-shadows-in-my-game-engine-e0k6jfu8v
og:image: https://api.daily.dev/og/posts/e0k6jFU8v.png
og:image:alt: How I Implemented Shadows in my Game Engine
og:image:width: 1200
og:image:height: 630
og:locale: en
---

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

# How I Implemented Shadows in my Game Engine

**[ThinMatrix](https://daily.dev/sources/thinmatrix)** · 7 min read · 0 upvotes · 0 comments

## Summary

A developer shares how they implemented shadow mapping in their custom game engine for a casual farming game. The post covers the core shadow mapping technique (rendering depth from the light's perspective), fixing shadow acne by rendering back faces instead of front faces, softening shadow edges using percentage closer filtering (PCF) with randomized sample offsets, and reducing shadow map shimmering by using a slightly oversized shadow area that only recalculates when the camera exits its bounds. Future improvements mentioned include fixing light bleeding at terrain intersections, using disc-pattern PCF samples, pre-calculating random offsets as a 3D texture, and leveraging comparison mode with linear filtering for free 2x2 PCF.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=uueB2kVvbHo>

## Similar posts on daily.dev

- [See How Shadows Are Changing This Character's Face](https://daily.dev/posts/see-how-shadows-are-changing-this-character-s-face-syhhrf853) · 80 LEVEL · 0 upvotes · 0 comments
- [Ray Marching Soft Shadows in 2D](https://daily.dev/posts/ray-marching-soft-shadows-in-2d-thztqcaqe) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#game-development](https://daily.dev/tags/game-development), [#graphics-programming](https://daily.dev/tags/graphics-programming)

[View this post on daily.dev](https://daily.dev/posts/how-i-implemented-shadows-in-my-game-engine-e0k6jfu8v)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How I Implemented Shadows in my Game Engine","url":"https://daily.dev/posts/how-i-implemented-shadows-in-my-game-engine-e0k6jfu8v","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-i-implemented-shadows-in-my-game-engine-e0k6jfu8v"},"datePublished":"2026-07-19T07:59:18.506Z","dateModified":"2026-10-14T02:26:08.604Z","description":"A developer shares how they implemented shadow mapping in their custom game engine for a casual farming game. The post covers the core shadow mapping technique...","image":"https://i.ytimg.com/vi/uueB2kVvbHo/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/uueB2kVvbHo/sddefault.jpg","isAccessibleForFree":true,"articleSection":"ThinMatrix","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ThinMatrix","logo":"https://media.daily.dev/image/upload/s--OWv8mw_W--/f_auto,q_auto/v1784447931/logos/thinmatrix?_a=BAMAMicg0","url":"https://daily.dev/sources/thinmatrix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-i-implemented-shadows-in-my-game-engine-e0k6jfu8v","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"game-development,graphics-programming","timeRequired":"PT7M","video":{"@type":"VideoObject","name":"How I Implemented Shadows in my Game Engine","description":"A developer shares how they implemented shadow mapping in their custom game engine for a casual farming game. The post covers the core shadow mapping technique...","thumbnailUrl":"https://i.ytimg.com/vi/uueB2kVvbHo/sddefault.jpg","uploadDate":"2026-07-19T07:59:18.506Z","duration":"PT7M","url":"https://api.daily.dev/r/e0k6jFU8v","embedUrl":"https://www.youtube.com/embed/uueB2kVvbHo"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ThinMatrix","item":"https://daily.dev/sources/thinmatrix"},{"@type":"ListItem","position":3,"name":"How I Implemented Shadows in my Game Engine"}]}
```

