摘要: matcap 代码实现 Shader "Shader/Matcap" { Properties { _NormalMap("normalmap",2D) = "bump" {} //面板需要的参数 _Matcap("matcap",2D) = "gray" {} _FresnelPow("Fresn 阅读全文
posted @ 2023-02-07 12:22 LOFU 阅读(13) 评论(0) 推荐(0) 编辑
摘要: oldschool Pro 有参考苏格拉底代码格式 Shader "Shader/OldSchoolPro" { Properties { _SpecularPow("SpecularPower",range(1,99)) = 30 //面板需要的参数 _EnvIntensity("EnvInten 阅读全文
posted @ 2023-02-05 16:08 LOFU 阅读(14) 评论(0) 推荐(0) 编辑
摘要: Phong 连连看 Phong blinn-Phong shader代码实现 Shader "Shader/oldschool" { Properties{ _MainCol("color",color) = (1.0,1.0,1.0,1.0) _SpecularPow("specularPow", 阅读全文
posted @ 2023-01-30 21:53 LOFU 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 半兰伯特 Shader "Shader/lanbert" { Properties{ } SubShader{ Tags { "RenderType" = "Opaque" } Pass { Name "FORWARD" Tags { "LightMode" = "ForwardBase" } CG 阅读全文
posted @ 2023-01-29 20:45 LOFU 阅读(14) 评论(0) 推荐(0) 编辑
摘要: Lesson 1 的task1-2 应用的要点: 1. 光照方向的反方向向量与物体表面法向量点乘,可以得到光会把物体表面打亮多少,乘积为1最亮,为0或负数则照不到 2. 兰伯特光照就是把这个乘积暴力变为(0,1)区间,即负数一律当0处理 3. 半兰伯特则是将(-1,1)范围缩为(-0.5,0.5)再 阅读全文
posted @ 2023-01-28 16:00 LOFU 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 因为后面的圆和环就是跑数学公式了所以偷懒了orz using System.Collections; using System.Collections.Generic; using UnityEngine; using static UnityEngine.Mathf; public static 阅读全文
posted @ 2023-01-24 16:29 LOFU 阅读(10) 评论(0) 推荐(0) 编辑
摘要: graph.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class graph : MonoBehaviour { [SerializeField] Transfor 阅读全文
posted @ 2023-01-19 21:13 LOFU 阅读(15) 评论(0) 推荐(0) 编辑
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class clock : MonoBehaviour { const float hoursToD 阅读全文
posted @ 2023-01-18 21:54 LOFU 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 放图占位 #include <glad/glad.h> #include <GLFW/glfw3.h> #include<iostream> void framebuffer_size_callback(GLFWwindow* window, int width, int height) { glV 阅读全文
posted @ 2022-12-04 16:19 LOFU 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 最终结果图~渲了10个小时 阅读全文
posted @ 2022-11-09 23:00 LOFU 阅读(10) 评论(0) 推荐(0) 编辑