18 lines
814 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Toon多光源参考
date: 2025-03-27 19:01:13
excerpt:
tags:
rating: ⭐
---
# 前言
- [【UE5】卡通渲染着色篇3多光源](https://zhuanlan.zhihu.com/p/717533663)
- DirectionalLight
- 主要是通过判断所有灯光的Forward Shading Priority与亮度取得主光。
- 之后在FDeferredLightPS中添加一个判断是否是主光的变体并进行设置即可。
- 也可以通过FlattenNormal来减少高频信息。
- PointLight
- 可以通过FlattenNormal(ShadingModels.ush)来减少点光源计算中的高频细节
- YivanLee的多光源方案
- ShadingModels.ush中只渲染光影不渲染颜色用于合并多光源光影结果。
- 在Lighting Pass之后添加一个LightingPostProcess Pass根据合并的光影采样Ramp渲染最终光照结果。