当前位置:网站首页>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)
边栏推荐
猜你喜欢
随机推荐
markdown使用技巧
过大数组导致爆栈的解决方法记录(堆栈)
多线程与多进程(概念详细讲解)
Linux的文件IO与标准IO,以及IO缓存
氨氮的有效吸附材料
每日刷题(day03)——leetcode 899. 有序队列
系统架构和问题定位
Share a professional TA's "Shader Reference"
初学者也能看懂的Ray March体积云
手把手教你改内核源码--sysfs虚拟文件系统1
【fiddler2】使用fiddler mock response 数据
碳酸锂、碳酸氢锂溶液除钙镁离子工艺原理
STM32F407ZG 串口通信+固定帧头帧尾传输数据帧
常用模块封装-pymysql、pymongo(可优化)
51单片机手动自动智能窗户窗帘控制系统手动自动定时
unity守则(随时持续更新\自我总结)
KDE框架介绍
【fiddler3】使用fiddler设置弱网模式
溶液中重金属去除
STC12C5A60S2单片机WIFI信号扫描报警监视系统信号增强信号过低报警








