当前位置:网站首页>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)
边栏推荐
猜你喜欢
随机推荐
优化Mysql运行OrderBy性能
系统架构和问题定位
8个问题轻松掌握Unity前向渲染
请亲们关注下我,谢谢了。
mysql连接报错:Cannot get a connection, pool error Timeout waiting for idle object
废水中氟离子去除方法
51单片机手动自动智能窗户窗帘控制系统手动自动定时
每日刷题(day02)——leetcode 622. 设计循环队列
优先级队列,大小顶堆PriorityQueue
Share a professional TA's "Shader Reference"
C陷阱与缺陷 个人阅读笔记
Unity屏幕坐标转世界坐标,鼠标点击获取三维位置
内核映像文件格式
【fiddler4】使用fiddler设置简单并发
ASP.NET连接SQL Server的步骤
51单片机AD590温度测量ADC0832运放2.73V减法电压变换
Tkinter 模块学习
视差映射:更逼真的纹理细节表现(上):为什么要使用视差映射
通过adb devices命令在控制台显示企业级PicoNeo3设备号
51单片机ST188手持人体温度脉搏心率测量仪锂电池充电