01 2023 档案
摘要:Phong 连连看 Phong blinn-Phong shader代码实现 Shader "Shader/oldschool" { Properties{ _MainCol("color",color) = (1.0,1.0,1.0,1.0) _SpecularPow("specularPow",
阅读全文
摘要:半兰伯特 Shader "Shader/lanbert" { Properties{ } SubShader{ Tags { "RenderType" = "Opaque" } Pass { Name "FORWARD" Tags { "LightMode" = "ForwardBase" } CG
阅读全文
摘要:Lesson 1 的task1-2 应用的要点: 1. 光照方向的反方向向量与物体表面法向量点乘,可以得到光会把物体表面打亮多少,乘积为1最亮,为0或负数则照不到 2. 兰伯特光照就是把这个乘积暴力变为(0,1)区间,即负数一律当0处理 3. 半兰伯特则是将(-1,1)范围缩为(-0.5,0.5)再
阅读全文
摘要:因为后面的圆和环就是跑数学公式了所以偷懒了orz using System.Collections; using System.Collections.Generic; using UnityEngine; using static UnityEngine.Mathf; public static
阅读全文
摘要:graph.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class graph : MonoBehaviour { [SerializeField] Transfor
阅读全文
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class clock : MonoBehaviour { const float hoursToD
阅读全文