{"id":23850630,"url":"https://github.com/yinb1426/custom-skybox","last_synced_at":"2026-05-24T22:30:20.515Z","repository":{"id":261922613,"uuid":"872979656","full_name":"yinb1426/Custom-Skybox","owner":"yinb1426","description":"Custom Skybox using URP","archived":false,"fork":false,"pushed_at":"2024-11-09T08:50:37.000Z","size":2963,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-02T22:39:36.126Z","etag":null,"topics":["shader","unity-shader","unity3d","urp"],"latest_commit_sha":null,"homepage":"","language":"ShaderLab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yinb1426.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-15T12:04:07.000Z","updated_at":"2024-11-26T13:20:49.000Z","dependencies_parsed_at":"2024-11-09T09:41:38.130Z","dependency_job_id":null,"html_url":"https://github.com/yinb1426/Custom-Skybox","commit_stats":null,"previous_names":["yinb1426/custom-skybox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinb1426%2FCustom-Skybox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinb1426%2FCustom-Skybox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinb1426%2FCustom-Skybox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinb1426%2FCustom-Skybox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yinb1426","download_url":"https://codeload.github.com/yinb1426/Custom-Skybox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240138240,"owners_count":19753895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["shader","unity-shader","unity3d","urp"],"created_at":"2025-01-02T22:39:47.629Z","updated_at":"2026-05-24T22:30:20.449Z","avatar_url":"https://github.com/yinb1426.png","language":"ShaderLab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 自定义天空盒\n## 概述\n自定义天空盒，提供清晨、白天、黄昏、深夜**天空颜色**的配置，**太阳、月亮、星空**等相关参数设置，并提供云层、星空、极光等显示选项。\n## 特性\n* 提供清晨、白天、黄昏、深夜，4段时间天空颜色的配置。\n* 提供太阳、月亮、星空相关参数的配置。\n* 提供噪声云层显示选项及其相关参数配置。\n* 提供星空显示选项及其相关参数配置。\n* 提供极光显示选项及其相关参数配置。\n## 使用说明\n1. 请创建Unity URP工程以使用此天空盒\n2. 在“Window-Rendering-Lighting”菜单中，选择Environment选项卡中的“Skybox Material”选择本天空盒\n3. 在场景中创建空GO，将脚本SkyboxController.cs挂载在本GO上，并设置天空盒材质与主灯光参数即可。\n\u003e SkyboxController.cs脚本用于控制时间流动，主灯光位置与旋转参数，以及天空颜色的梯度和显示时间的曲线\n## Shader参数\n**常规**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| CurrentTime | Range(0, 24) | 当前时间，由SkyboxController.cs脚本控制 | |\n\n**太阳与月亮**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| SunColor | Color[HDR] | 日光颜色 | (2.996078, 2.996078, 2.996078, 1, 2)\n| SunRadius | Float | 太阳尺寸半径 | 0.05 |\n| SunStrength | Float | 控制太阳范围与强度的系数 | 50.0 |\n| MoonColor | Color[HDR] | 月光颜色 |(2.996079, 2.530082, 0.6660917, 1, 2) |\n| MoonRadius | Float | 月亮尺寸半径 | 0.05 |\n| MoonStrength | Float | 控制月亮范围与强度的系数 | 50.0 |\n| MoonCrescenOffset | Range(-0.1, 0.1) | 月牙遮挡偏移程度 | 0.1 |\n\n**泛光**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| BloomRadius | Float | 泛光区域半径 | 0.6 |\n| BloomStrength | Float | 控制泛光强度的系数 | 0.4 |\n| MorningBloomColor | Color | 清晨泛光颜色 | (198, 175, 164, 255) |\n| AfternoonBloomColor | Color | 白天泛光颜色 | (255, 255, 255, 255) |\n| DuskBloomColor | Color | 黄昏泛光颜色 | (255, 151, 39, 255) |\n| NightBloomColor | Color | 深夜泛光颜色 | (57, 73, 93, 255) |\n\n**清晨天空**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| MorningColorGradientTexture | 2D | 清晨天空颜色梯度图 |  |\n| MorningTimeCurveTexture | 2D | 清晨天空起止时间曲线图 |  | \n\n**白天天空**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| AfternoonColorGradientTexture | 2D | 白天天空颜色梯度图 |  |\n| AfternoonTimeCurveTexture | 2D | 白天天空起止时间曲线图 |  | \n\n**黄昏天空**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | :------ | :------: |\n| DuskColorGradientTexture | 2D | 黄昏天空颜色梯度图 |  |\n| DuskTimeCurveTexture | 2D | 黄昏天空起止时间曲线图 |  | \n\n**深夜天空**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| NightColorGradientTexture | 2D | 深夜天空颜色梯度图 |  |\n| NightTimeCurveTexture | 2D | 深夜天空起止时间曲线图 |  | \n\n**云层**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| UseCloud | Toggle | 是否显示云层 | √ |\n| CloudHeight | Float | 云层高度 | 2.5 |\n| CloudBaseNoise | 2D | 云层基底噪声 | |\n| CloudFirstNoise | 2D | 云层第一层噪声 | |\n| CloudSecondNoise | 2D | 云层第二层噪声 | |\n| CloudDirection | Vector | 云层飘动方向(仅xy有效) | (1, 1, 0, 0) |\n| CloudSpeed | Float | 云层飘动速度 | 0.008 |\n| CloudThreshold | Range(0, 1) | 云层显示区间左边界 | 0.02 |\n| CloudRange | Range(0, 1) | 云层显示区间范围 | 0.222 |\n| CloudTimeCurveTexture | 2D | 云层显示起止时间曲线图 |  | \n\n**云层颜色**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| MorningCloudColor | Color | 清晨云层颜色 | (235, 187, 151, 255) |\n| AfternoonCloudColor | Color | 白天云层颜色 | (255, 255, 255, 255) |\n| DawnCloudColor | Color | 黄昏云层颜色 | (205, 166, 168, 255)|\n| NightCloudColor | Color | 深夜云层颜色 | (52, 103, 159, 255) |\n\n**云层消隐**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| UseCloudFade | Toggle | 是否开启云层远处消隐 | √ |\n| CloudFadeDistanceThreshold | Range(0, 1) | 云层远处消隐区间左边界 | 0.0 |\n| CloudFadeDistanceRange | Range(0, 1) | 云层远处消隐区间左边界 | 0.025 |\n\n**星空**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| StarTexture | 2D | 星空噪声纹理 | |\n| StarColor | Color[HDR] | 星星颜色 | (1.513275, 2.556686, 7.373443, 1, 3.299263) |\n| StarThreshold | Range(0, 1) | 星空显示区间左边界 | 0.35 |\n\n**极光**：\n| 参数 | 类型 | \u003ccenter\u003e说明\u003c/center\u003e | 建议参考值 |\n| :------: | :------: | ------ | :------: |\n| UseAurora | Toggle | 是否显示极光 | √ |\n| AuroraColor | Color | 极光光晕颜色 | (81, 145, 255, 255) |\n| AuroraColorFactor | Range(0, 1) | 极光颜色系数 | 0.848 |\n| AuroraSpeed | Range(0, 1) | 极光运动速度 | 0.3 |\n| AuroraTimeCurveTexture | 2D | 极光显示起止时间曲线图 |  | \n\n\u003e 原天空颜色和现实时间的诸多变量已经**废弃**，由脚本中的**梯度和曲线**替代。\n\n## 实现效果\n* 清晨(Morning)：\n![SkyboxMorning](https://github.com/yinb1426/Custom-Skybox/blob/main/Pictures/SkyboxMorning.png)\n* 白天(Afternoon)：\n![SkyboxAfternoon](https://github.com/yinb1426/Custom-Skybox/blob/main/Pictures/SkyboxAfternoon.png)\n* 黄昏(Dusk)：\n![SkyboxDusk](https://github.com/yinb1426/Custom-Skybox/blob/main/Pictures/SkyboxDusk.png)\n* 深夜(Night)：\n![SkyboxNight](https://github.com/yinb1426/Custom-Skybox/blob/main/Pictures/SkyboxNight.png)\n* 深夜-极光(NightAurora)：\n![SkyboxNightAurora](https://github.com/yinb1426/Custom-Skybox/blob/main/Pictures/SkyboxNightAurora.png)\n## TODO\n* 日月贴图显示\n* 体积云\n* 体积光？\n* 其他天空盒可添加的现象(灵感快来!!!)\n* ......\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinb1426%2Fcustom-skybox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyinb1426%2Fcustom-skybox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinb1426%2Fcustom-skybox/lists"}