vault backup: 2023-12-18 10:48:54

This commit is contained in:
BlueRose 2023-12-18 10:48:54 +08:00
parent 15acc466fa
commit 22a05e5af1
2 changed files with 23 additions and 7 deletions

View File

@ -14,16 +14,22 @@ OutGBufferB = Metallic/Specular/Roughness/EncodeShadingModelIdAndSelectiveOutput
OutGBufferC = BaseColor/GBufferAO
OutGBufferD = GBuffer.CustomData;
OutGBufferE = GBuffer.PrecomputedShadowFactors;
// 0..1, 2 bits, use CastContactShadow(GBuffer) or HasDynamicIndirectShadowCasterRepresentation(GBuffer) to extract
half PerObjectGBufferData;
```
ToonGBuffer修改计划
ToonGBuffer修改&数据存储
```c#
GBufferB:Metallic/Specular/Roughness => ToonHairMask OffsetShadowMask/SpcularMask/SpecularValue
OutGBufferA = PerObjectGBufferData => 可以存储额外的有关Tonn渲染功能参数。
OutGBufferB:Metallic/Specular/Roughness => ToonHairMask OffsetShadowMask/SpcularMask/SpecularValue
OutGBufferD = CustomData.xyzw => ShaderColor.rgb/NoL
OutGBufferE = GBuffer.PrecomputedShadowFactors.xyzw => /RimLightMask/DiffuseOffset/RimLightWidth
OutGBufferF = velocity => OutlineWidth/OutlineID/OutlinePaint/OutlineZShift
```
```
| GBuffer | 表头 |
| -------- | ------------------------------------------------------------------------------------- |
@ -33,15 +39,13 @@ OutGBufferF = velocity => OutlineWidth/OutlineID/OutlinePaint/OutlineZShift
| GBufferF | ID |
```
## BaseColor与ShadowColor
## Ba8eColor与ShadowColor
- 原神里ShadowColor还会接收其他物体的阴影投射没有自投影;蓝色协议可能也没有自投影。
BaseColor与ShadowColor的过渡需要Step、Feather、Offset等参数可以直接制作一个HalfLambert的渐变贴图之后使用View传递。因为有多个贴图所以还需要ID贴图指定。但这样需要考虑一个问题
- 一个物体上的同一个ID区域的BaseColor与ShadowColor是否都是一样的
9体上的同一个ID区域的BaseColor与ShadowColor是否都是一样的
- 如果不一样就需要再传递一个ShadowColor.rgb到GBuffer里。
- 不管如何手绘的补充暗部也是需要加到GBuffer中的
这决定传递到View里面的渐变贴图是彩色还是暗色
### 预计算贴图方案(构想)

View File

@ -0,0 +1,12 @@
---
title: ToonShaderModel
date: 2023-12-18 10:00:34
excerpt:
tags:
rating: ⭐
---
# ToonStandardCel打底
# 厚涂 ShaderModel通过修改预积分ShaderModel