-
-
Save kirillrybin/8291572 to your computer and use it in GitHub Desktop.
Shader for blending skyboxes in Unity3D via http://forum.unity3d.com/threads/213679-4in1-blending-skybox-HELP!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "RenderFX/Skybox Blended" { | |
Properties { | |
_Tint ("Tint Color", Color) = (.5, .5, .5, .5) | |
_Blend ("Blend", Range(0.0,1.0)) = 0.5 | |
_Skybox1 ("Skybox one", Cube) = "" | |
_Skybox2 ("Skybox two", Cube) = "" | |
} | |
SubShader { | |
Tags { "Queue" = "Background" } | |
Cull Off | |
Fog { Mode Off } | |
Lighting Off | |
Color [_Tint] | |
Pass { | |
SetTexture [_Skybox1] { combine texture } | |
SetTexture [_Skybox2] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous } | |
SetTexture [_Skybox2] { combine previous +- primary, previous * primary } | |
} | |
} | |
Fallback "RenderFX/Skybox", 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment