{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/unity-cubemap-skybox/",
  "atlas": "https://www.pystone.net/?node=unity-cubemap-skybox#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/unity-cubemap-skybox.md",
  "context": "https://www.pystone.net/notes/unity-cubemap-skybox.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:unity-cubemap-skybox",
  "slug": "unity-cubemap-skybox",
  "title": "CubeMap & Skybox",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "CubeMap & Skybox",
  "contentRole": "unspecified",
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "unspecified",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "b1e8a476677bc60d460a11bea1b5ae1a79bb3da97b4d528a3a65c23339a33f73",
  "assets": [
    {
      "reference": "assets/1615185104728.png",
      "url": "/media/93c73dc963da3750c3b8.png",
      "mediaType": "image/png",
      "contentHash": "93c73dc963da3750c3b83f780f2078cf34c67bcdbb264c51dbe23fc185234a9d",
      "byteLength": 85856,
      "width": 498,
      "height": 423
    },
    {
      "reference": "assets/1615185140709.png",
      "url": "/media/f30a67ccfeefd8c1b07f.png",
      "mediaType": "image/png",
      "contentHash": "f30a67ccfeefd8c1b07f5da1f7bd946a31091ff84b28685477e8c71678e6e25c",
      "byteLength": 137039,
      "width": 503,
      "height": 947
    },
    {
      "reference": "assets/1615185709526.png",
      "url": "/media/86959cb28357d4db7766.png",
      "mediaType": "image/png",
      "contentHash": "86959cb28357d4db7766fece8a217c7734f6f2aa9080a3021018edcf98b19b45",
      "byteLength": 107456,
      "width": 321,
      "height": 587
    },
    {
      "reference": "assets/1615185174675.png",
      "url": "/media/10cac10e5d5fb54504cc.png",
      "mediaType": "image/png",
      "contentHash": "10cac10e5d5fb54504cce55dcbd02757ff88dd9d3b11aaf6a63446f0eae28e02",
      "byteLength": 329115,
      "width": 503,
      "height": 947
    },
    {
      "reference": "assets/1615185387170.png",
      "url": "/media/e27fff68512cf4e3d741.png",
      "mediaType": "image/png",
      "contentHash": "e27fff68512cf4e3d741f6f0cfa996d777b25fc74539b79c82d805c30842ebf2",
      "byteLength": 16040,
      "width": 501,
      "height": 189
    },
    {
      "reference": "assets/1615185458141.png",
      "url": "/media/a6864d9b103b55495608.png",
      "mediaType": "image/png",
      "contentHash": "a6864d9b103b55495608dd009136be1d06493f1f04c8f05208ba1ef299a41e47",
      "byteLength": 22252,
      "width": 494,
      "height": 294
    }
  ],
  "headings": [
    {
      "depth": 1,
      "text": "CubeMap & Skybox",
      "anchor": "cubemap-skybox",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#cubemap-skybox"
    },
    {
      "depth": 2,
      "text": "Cubemap",
      "anchor": "cubemap",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#cubemap"
    },
    {
      "depth": 2,
      "text": "制作方法",
      "anchor": "制作方法",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#%E5%88%B6%E4%BD%9C%E6%96%B9%E6%B3%95"
    },
    {
      "depth": 3,
      "text": "Legacy Cubemap Assets",
      "anchor": "legacy-cubemap-assets",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#legacy-cubemap-assets"
    },
    {
      "depth": 3,
      "text": "Cubemap texture",
      "anchor": "cubemap-texture",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#cubemap-texture"
    },
    {
      "depth": 3,
      "text": "PanoramaToCubemap",
      "anchor": "panoramatocubemap",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#panoramatocubemap"
    },
    {
      "depth": 3,
      "text": "Shader实现",
      "anchor": "shader实现",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#shader%E5%AE%9E%E7%8E%B0"
    },
    {
      "depth": 2,
      "text": "Skybox的实现",
      "anchor": "skybox的实现",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#skybox%E7%9A%84%E5%AE%9E%E7%8E%B0"
    },
    {
      "depth": 3,
      "text": "使用Cubemap",
      "anchor": "使用cubemap",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#%E4%BD%BF%E7%94%A8cubemap"
    },
    {
      "depth": 3,
      "text": "在Shader中对6张图采样",
      "anchor": "在shader中对6张图采样",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#%E5%9C%A8shader%E4%B8%AD%E5%AF%B96%E5%BC%A0%E5%9B%BE%E9%87%87%E6%A0%B7"
    },
    {
      "depth": 3,
      "text": "Panorama(全景画)",
      "anchor": "panorama全景画",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#panorama%E5%85%A8%E6%99%AF%E7%94%BB"
    },
    {
      "depth": 2,
      "text": "Ref",
      "anchor": "ref",
      "citation": "https://www.pystone.net/notes/unity-cubemap-skybox/#ref"
    }
  ],
  "claims": [],
  "outgoing": [],
  "incoming": [
    {
      "id": "note:game-graphics-and-runtime",
      "title": "游戏图形与运行时",
      "url": "https://www.pystone.net/notes/game-graphics-and-runtime/",
      "atlas": "https://www.pystone.net/?node=game-graphics-and-runtime#knowledge-atlas",
      "label": "游戏图形与运行时",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "Unity中的“CubeMap & Skybox”导航项",
      "citation": "https://www.pystone.net/notes/game-graphics-and-runtime/#unity"
    }
  ],
  "contentMarkdown": "# CubeMap & Skybox\n\n> 创建时间：2021/3/8 11:46\n\n## Cubemap\n\nA Cubemap is a collection of **six square textures** that represent the reflections on an environment. The six squares form the faces of an imaginary cube that surrounds an object; each face represents the view along the directions of the world axes (up, down, left, right, forward and back).\n\n可以使用方向向量对它们索引和采样\n\n```csharp\nstring s1 = &quot;Hello &quot;;\nstring s2 = s1;\ns1 += &quot;World&quot;;\n\nSystem.Console.WriteLine(s2);\n//Output: Hello\n\n```\n\n## 制作方法\n\n### Legacy Cubemap Assets\n\n![Alt text](assets/1615185104728.png)\n\n### Cubemap texture\n\n![Alt text](assets/1615185140709.png)\n\n### PanoramaToCubemap\n\n![Alt text](assets/1615185709526.png)\n\n### Shader实现\n\n使用Texture2D格式，在Shader当中组织，而不使用Unity的Cubemap格式。\n\n![Alt text](assets/1615185174675.png)\n\n## Skybox的实现\n\n### 使用Cubemap\n\n制作Cubemap资源 。Buitin Shader当中的Skybox/Cubemap可以对Cubemap采样\n\n![Alt text](assets/1615185387170.png)\n\n### 在Shader中对6张图采样\n\nBuiltin Shader: Mobile-Skybox\n\n![Alt text](assets/1615185458141.png)\n\n### Panorama(全景画)\n\nBuiltin Shader: Skybox/Panoramic\n可以直接Texture2D格式的对全景图进行采样。\n\n## Ref\n\n<https://blog.csdn.net/v_xchen_v/article/details/79474193>\n"
}
