当前位置:网站首页>Talking about 3 common shadow rendering techniques in games (2): shadow cone
Talking about 3 common shadow rendering techniques in games (2): shadow cone
2022-08-10 06:14:00 【Youmeng Maker】
Talking about 3 common shadow rendering techniques in games (2): shadow cone
Copyright Notice
- This article is an original article of "Youmeng Maker", you can reprint it freely, but you must add a complete copyright statement
- For more learning resources, please add QQ: 1517069595 (enterprise-level performance optimization/hot update/Shader special effects/server/commercial project combat/weekly live broadcast/one-to-one guidance)
Second, the shadow cone
Principle:
- The shadow cone uses a method called stencil buffer. As shown in the figure below, there is a triangle. When the light source illuminates the triangle, it will produce a shadow. We stretch this triangle, and a purple area will be stretched out on the front.And a blue area, these two areas are called the front area, and a brown area will be generated on the back. When these three areas are elongated, a triangular pyramid, that is, a shadow cone, will be formed.
- The shadow cone uses a method called stencil buffer. As shown in the figure below, there is a triangle. When the light source illuminates the triangle, it will produce a shadow. We stretch this triangle, and a purple area will be stretched out on the front.And a blue area, these two areas are called the front area, and a brown area will be generated on the back. When these three areas are elongated, a triangular pyramid, that is, a shadow cone, will be formed.
Implementation method:
- The implementation formula of the shadow cone is actually (1)+(2)-(3). For the specific implementation method and more implementation details, you can pay attention to our public class, which contains the method of shadow cone rendering.
For more learning resources, please add QQ: 1517069595 (/enterprise-level performance optimization/hot update/Shader special effects/server/commercial project combat/weekly live broadcast/one-to-one guidance)
边栏推荐
- Explore the origin of the garbled problem: the association between GBK, UTF8, UTF16, UTF8BOM, and ASN1
- Unity插件DOTween使用指南2(简释贝塞尔曲线)
- STC12C5A60S2单片机WIFI信号扫描报警监视系统信号增强信号过低报警
- 如何实现网格建造系统
- 常用模块封装-csv文件操作封装
- ASP.Net利用代码点击相应按钮来关闭当前的页面(亲测有效)
- STM32F407ZG TIM通用定时器
- 21天学习挑战赛--分班
- STM32F407ZG 看门狗 IWDG & WWDG
- 动态规划、背包问题 6/25 110-115
猜你喜欢
随机推荐
STM32F407ZG 看门狗 IWDG & WWDG
ArgumentException: GetComponent requires that the requested component ‘GameObject‘ derives from Mono
How to implement a grid construction system
GC0053-STM32单片机NTC热敏电阻温度采集及控制LCD1602
新建STM32F407ZG Keil5项目
剑指 Offer(第 2 版)7/12 18-20
STM32单片机手机APP蓝牙高亮RGB彩灯控制板任意颜色亮度调光
Unity导航与寻路系统的基本使用
lua的模块与类
最简单的字符设备驱动
Unity中采用二进制存档与读档
STC12C5A60S2单片机WIFI信号扫描报警监视系统信号增强信号过低报警
Myunity框架笔记2
接口自动化2.0
Easy to master Unity of eight prior to rendering
qemu和主机共享磁盘
钴镍回收树脂的工艺原理
二叉树 6/20 86-90
解析树字符串并输出中序遍历
lua小工具-保留指定位数的小数