<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/introduction-to-spherical-harmonics-for-graphics-programmers-yrg4hqncf" -->

---
title: Introduction to Spherical Harmonics for Graphics Programmers
description: A thorough introduction to spherical harmonic (SH) functions aimed at graphics programmers. Covers the mathematical foundations including function spaces,...
canonical: https://daily.dev/posts/introduction-to-spherical-harmonics-for-graphics-programmers-yrg4hqncf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Introduction to Spherical Harmonics for Graphics Programmers | daily.dev
og:description: A thorough introduction to spherical harmonic (SH) functions aimed at graphics programmers. Covers the mathematical foundations including function spaces,...
og:url: https://daily.dev/posts/introduction-to-spherical-harmonics-for-graphics-programmers-yrg4hqncf
og:image: https://api.daily.dev/og/posts/yRg4HqnCf.png
og:image:alt: Introduction to Spherical Harmonics for Graphics Programmers
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.

# Introduction to Spherical Harmonics for Graphics Programmers

**[Hacker News](https://daily.dev/sources/hn)** · 38 min read · 0 upvotes · 0 comments

## Summary

A thorough introduction to spherical harmonic (SH) functions aimed at graphics programmers. Covers the mathematical foundations including function spaces, orthonormal bases, associated Legendre polynomials, and the real-valued SH definition used in computer graphics. Includes JavaScript code for evaluating SH basis functions, projecting cubemaps to SH coefficients via Riemann sums with correct solid-angle weighting, and handling ringing/Gibbs artifacts through windowing. Also walks through a practical case study of projecting irradiance to SH for lightmaps, explaining the convolution property of SH and how Frostbite uses L1 SH to support normal-mapped baked lighting.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://gpfault.net/posts/sph.html>

## Similar posts on daily.dev

- [Graphics Programming weekly - Issue 436 - April 12th, 2026](https://daily.dev/posts/graphics-programming-weekly---issue-436---april-12th-2026-8ri5aijvc) · Jendrik Illner · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/introduction-to-spherical-harmonics-for-graphics-programmers-yrg4hqncf)

```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":"Introduction to Spherical Harmonics for Graphics Programmers","url":"https://daily.dev/posts/introduction-to-spherical-harmonics-for-graphics-programmers-yrg4hqncf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/introduction-to-spherical-harmonics-for-graphics-programmers-yrg4hqncf"},"datePublished":"2026-04-16T07:39:34.455Z","dateModified":"2026-04-16T07:40:02.067Z","description":"A thorough introduction to spherical harmonic (SH) functions aimed at graphics programmers. Covers the mathematical foundations including function spaces,...","image":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","thumbnailUrl":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","isAccessibleForFree":true,"articleSection":"Hacker News","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":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/introduction-to-spherical-harmonics-for-graphics-programmers-yrg4hqncf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,graphics-programming","timeRequired":"PT38M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Introduction to Spherical Harmonics for Graphics Programmers"}]}
```

