This file contains hidden or 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 "CookbookShaders/SnakeyPlane" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _TintAmount ("Tint Amount", Range(0,1)) = 0.5 | |
| _ColorA ("Color A", Color) = (1,1,1,1) | |
| _ColorB ("Color B", Color) = (1,1,1,1) | |
| _Speed ("Wave Speed", Range(0.1, 80)) = 5 | |
| _Frequency ("Wave Frequency", Range(0, 5)) = 2 |
This file contains hidden or 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 "CookbookShaders/AnisotropicSpecular" | |
| { | |
| Properties | |
| { | |
| _MainTint ("Diffuse Tint", Color) = (1,1,1,1) | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _SpecularColor ("Specular Color", Color) = (1,1,1,1) | |
| _Specular ("Specular Amount", Range(0,1)) = 0.5 | |
| _SpecPower ("Specular Power", Range(0,1)) = 0.5 // p | |
| _AnisoDir ("Anisotropic Direction", 2D) = "" {} |
This file contains hidden or 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 "CookbookShaders/BlinnPhongSpecular" | |
| { | |
| Properties | |
| { | |
| _MainTint ("Diffuse Tint", Color) = (1,1,1,1) | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _SpecularColor ("Specular Color", Color) = (1,1,1,1) | |
| _SpecPower ("Specular Power", Range(0.1,60)) = 3 // p | |
| } | |
| SubShader |
This file contains hidden or 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
| using UnityEngine; | |
| [ExecuteInEditMode] | |
| public class ShowPhongReflection : MonoBehaviour | |
| { | |
| public float length = 1; | |
| public Vector3 bias; | |
| public Transform lightSource; // must be directional light | |
| // Update is called once per frame |
This file contains hidden or 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 "CookbookShaders/PhongSpecular" | |
| { | |
| Properties | |
| { | |
| _MainTint ("Diffuse Tint", Color) = (1,1,1,1) | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _SpecularColor ("Specular Color", Color) = (1,1,1,1) | |
| _SpecPower ("Specular Power", Range(0.2,30)) = 1 // p | |
| } | |
| SubShader |
This file contains hidden or 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 "CookbookShaders/ToonLighting" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Albedo (RGB)", 2D) = "white" {} | |
| _RampTex ("Ramp", 2D) = "white" {} | |
| _CelShadingLevels ("Cel Shading Levels", Range(0,15)) = 5 | |
| } | |
| SubShader | |
| { |
This file contains hidden or 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 "CookbookShaders/SimpleLambert" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Albedo (RGB)", 2D) = "white" {} | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Opaque" } | |
| LOD 200 |
This file contains hidden or 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 "CookbookShaders/Radius" | |
| { | |
| Properties | |
| { | |
| _Color("Color", Color) = (1,1,1,1) | |
| _MainTex("Albedo (RGB)", 2D) = "white" {} // the terrain's texture | |
| _Center ("Center", Vector) = (0,0,0,0) | |
| _Radius ("Radius", Float) = 1 | |
| _RadiusColor ("Radius Color", Color) = (1, 1, 1, 1) |
This file contains hidden or 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 "CookbookShaders/PackedTexture" | |
| { | |
| Properties | |
| { | |
| _MainTint ("Diffuse Tint", Color) = (1,1,1,1) | |
| _ColorA ("Terrain Color A", Color) = (1,1,1,1) | |
| _ColorB ("Terrain Color B", Color) = (1,1,1,1) | |
| _RTexture ("Red Channel Texture", 2D) = ""{} | |
| _GTexture ("Green Channel Texture", 2D) = ""{} | |
| _BTexture ("Blue Channel Texture", 2D) = ""{} |
This file contains hidden or 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 "CookbookShaders/Transparent" | |
| { | |
| Properties | |
| { | |
| _Color("Color", Color) = (1,1,1,1) | |
| _MainTex("Albedo (RGB)", 2D) = "white" {} | |
| } | |
| SubShader { | |
| // Transparent (ordering) | |
| Tags |