<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
		<id>https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Unity%2FShader%2Fskybox%2F%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4%2Fcubebox</id>
		<title>Unity/Shader/skybox/徐々に変更/cubebox - 変更履歴</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Unity%2FShader%2Fskybox%2F%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4%2Fcubebox"/>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Unity/Shader/skybox/%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4/cubebox&amp;action=history"/>
		<updated>2026-04-19T20:06:23Z</updated>
		<subtitle>このウィキのこのページに関する変更履歴</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>https://wiki.nonip.net/index.php?title=Unity/Shader/skybox/%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4/cubebox&amp;diff=17197&amp;oldid=prev</id>
		<title>Admin: /* CubeBlendのShaderのDLについて */</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Unity/Shader/skybox/%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4/cubebox&amp;diff=17197&amp;oldid=prev"/>
				<updated>2023-06-06T12:14:56Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;CubeBlendのShaderのDLについて&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←前の版&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2023年6月6日 (火) 12:14時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;公式のCubeBlend.shaderを使って行う&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;公式のCubeBlend.shaderを使って行う&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===CubeBlendのShaderのDLについて===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===CubeBlendのShaderのDLについて===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2種類ある。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2種類あるのでどちらか。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/DefaultResourcesExtra/Cubemaps/CubeBlend.shader&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/DefaultResourcesExtra/Cubemaps/CubeBlend.shader&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>https://wiki.nonip.net/index.php?title=Unity/Shader/skybox/%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4/cubebox&amp;diff=16350&amp;oldid=prev</id>
		<title>Admin: /* 作り方 */</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Unity/Shader/skybox/%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4/cubebox&amp;diff=16350&amp;oldid=prev"/>
				<updated>2022-12-12T17:22:21Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;作り方&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←前の版&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2022年12月12日 (月) 17:22時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行55:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行55:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;参考：https://qiita.com/inpax23/items/305ec946a7187cb58753&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==オブジェクトが表示されない問題==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==オブジェクトが表示されない問題==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>https://wiki.nonip.net/index.php?title=Unity/Shader/skybox/%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4/cubebox&amp;diff=16252&amp;oldid=prev</id>
		<title>Admin: ページの作成:「 ==徐々にcubeboxを変更するSkyboxShader== 公式のCubeBlend.shaderを使って行う ===CubeBlendのShaderのDLについて=== 2種類ある。 https://github.com...」</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Unity/Shader/skybox/%E5%BE%90%E3%80%85%E3%81%AB%E5%A4%89%E6%9B%B4/cubebox&amp;diff=16252&amp;oldid=prev"/>
				<updated>2022-12-07T04:54:57Z</updated>
		
		<summary type="html">&lt;p&gt;ページの作成:「 ==徐々にcubeboxを変更するSkyboxShader== 公式のCubeBlend.shaderを使って行う ===CubeBlendのShaderのDLについて=== 2種類ある。 https://github.com...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
==徐々にcubeboxを変更するSkyboxShader==&lt;br /&gt;
公式のCubeBlend.shaderを使って行う&lt;br /&gt;
===CubeBlendのShaderのDLについて===&lt;br /&gt;
2種類ある。&lt;br /&gt;
https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/DefaultResourcesExtra/Cubemaps/CubeBlend.shader&lt;br /&gt;
&lt;br /&gt;
https://unity.com/releases/editor/archive のwindowsやmacの&amp;quot;Build in Shaders&amp;quot;からDL。builtin_shaders-2021.3.4f1/DefaultResourcesExtra/Cubemaps/CubeBlend.shaderにもある。&lt;br /&gt;
&lt;br /&gt;
参考：https://bluebirdofoz.hatenablog.com/entry/2019/07/25/093410&lt;br /&gt;
&lt;br /&gt;
===作り方===&lt;br /&gt;
#Shaderのdirを作成して、新規でShaderを作り、&amp;quot;Skybox_CubeBlendShader&amp;quot;にファイル名を変更して、CubeBuild.Shaderを貼り付け。コード内のhiddenをskyboxに変更。&lt;br /&gt;
#Materialを新規作成して、InspectorのShaderを、Skybox/CubeBlendに変更する。&lt;br /&gt;
#2箇所のskyboxにcubemapをドラッグして設定。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
&lt;br /&gt;
public class SkyboxCubeBlend : MonoBehaviour&lt;br /&gt;
{&lt;br /&gt;
    [SerializeField] Material _skyMat = default;&lt;br /&gt;
    [SerializeField, Range(0f, 1f)] float _rate = 0.05f;&lt;br /&gt;
    Coroutine _coroutine = default;&lt;br /&gt;
    Material _runtimeMaterial = default;&lt;br /&gt;
&lt;br /&gt;
    public void Start()&lt;br /&gt;
    {&lt;br /&gt;
        FadeSkybox();&lt;br /&gt;
    }&lt;br /&gt;
    public void FadeSkybox()&lt;br /&gt;
    {&lt;br /&gt;
        if (_coroutine == null)&lt;br /&gt;
        {&lt;br /&gt;
            _runtimeMaterial = Instantiate(_skyMat);&lt;br /&gt;
            RenderSettings.skybox = _runtimeMaterial;&lt;br /&gt;
            _coroutine = StartCoroutine(FadeSkyboxRoutine(_rate));&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    IEnumerator FadeSkyboxRoutine(float rate)&lt;br /&gt;
    {&lt;br /&gt;
        float blend = 0f;&lt;br /&gt;
        while (blend &amp;lt; 1)&lt;br /&gt;
        {&lt;br /&gt;
            _runtimeMaterial.SetFloat(&amp;quot;_value&amp;quot;, blend);&lt;br /&gt;
            blend += rate;&lt;br /&gt;
            Debug.Log(&amp;quot;_value=&amp;quot; + blend);&lt;br /&gt;
            yield return null;&lt;br /&gt;
        }&lt;br /&gt;
        _runtimeMaterial.SetFloat(&amp;quot;_value&amp;quot;, 1);&lt;br /&gt;
        _coroutine = null;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==オブジェクトが表示されない問題==&lt;br /&gt;
Shader内の、&amp;quot;ZTest Always&amp;quot;を消すとよい。&lt;br /&gt;
&lt;br /&gt;
理由は、ZTestは、奥手前を制御するもので、Alwaysとすると、常にskyboxが、手前となるため。&lt;br /&gt;
&lt;br /&gt;
公式ZTest：https://docs.unity3d.com/ja/2022.1/Manual/SL-ZTest.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>