Skip to content

Instantly share code, notes, and snippets.

View tudour3's full-sized avatar

tudou tudour3

  • D3Plus
  • china
  • 22:16 (UTC -12:00)
View GitHub Profile
@tudour3
tudour3 / CubemapToEquirectangularWizard.cs
Created March 6, 2023 05:45 — forked from Farfarer/CubemapToEquirectangularWizard.cs
Create dynamic equirectangular maps for Unity. These have the benefit that, as they're flat images, you can sample lower mips to get blurry reflections. The straight cubemap version (detailed here: http://www.farfarer.com/blog/2011/07/25/dynamic-ambient-lighting-in-unity/ ) will give you hard seams when you sample mips from the cubemap. Although…
// Wizard to convert a cubemap to an equirectangular cubemap.
// Put this into an /Editor folder
// Run it from Tools > Cubemap to Equirectangular Map
using UnityEditor;
using UnityEngine;
using System.IO;
class CubemapToEquirectangularWizard : ScriptableWizard {