vault backup: 2024-03-14 20:26:25

This commit is contained in:
BlueRose 2024-03-14 20:26:25 +08:00
parent c82961c305
commit 894dc288f2
2 changed files with 45 additions and 51 deletions

View File

@ -233,10 +233,9 @@ static TAutoConsoleVariable<int32> CVarMaterialEnableNewHLSLGenerator(
TEXT("2 - Force all materials to use new generator\n"),
ECVF_RenderThreadSafe | ECVF_ReadOnly);
```
这个和新版材质HLSL生成器有关相关生成代码为**MaterialEmitHLSL()**=>调用**GenerateMaterialTemplateHLSL()**
bCompileForComputeShader = Material->IsLightFunction();
GetPerInstanceCustomDataX分为Vertex与Pixel版本。
#### FMaterialAttributes
@ -340,51 +339,6 @@ bool FMaterialInstanceResource::GetParameterValue(EMaterialParameterType Type, c
}
```
MaterialEmitHLSL()=>
```c++
bool MaterialEmitHLSL(const FMaterialCompileTargetParameters& InCompilerTarget,
const FStaticParameterSet& InStaticParameters,
FMaterial& InOutMaterial,
FMaterialCompilationOutput& OutCompilationOutput,
TRefCountPtr<FSharedShaderCompilerEnvironment>& OutMaterialEnvironment)
{
...
if (DerivativeIndex == 0)
{
const EMaterialDomain MaterialDomain = EmitContext.Material->GetMaterialDomain();
if (MaterialDomain == MD_Volume || (MaterialDomain == MD_Surface && IsSubsurfaceShadingModel(EmitMaterialData.ShadingModelsFromCompilation)))
{ const FMaterialParameterInfo SubsurfaceProfileParameterInfo(GetSubsurfaceProfileParameterName());
const FMaterialParameterMetadata SubsurfaceProfileParameterMetadata(1.f);
const Material::FExpressionParameter SubsurfaceProfileExpression(SubsurfaceProfileParameterInfo, SubsurfaceProfileParameterMetadata);
const FPreparedType SubsurfaceProfilePreparedType = EmitContext.PrepareExpression(&SubsurfaceProfileExpression, *EmitResultScope, EValueType::Float1);
const FEmitShaderExpression* SubsurfaceProfileEmitExpression = SubsurfaceProfileExpression.GetValueShader(
EmitContext,
*EmitResultScope,
EValueType::Float1,
SubsurfaceProfilePreparedType,
EValueType::Float1);
check(SubsurfaceProfileEmitExpression && SubsurfaceProfileEmitExpression->Reference);
SubsurfaceProfileShaderCode = SubsurfaceProfileEmitExpression->Reference;
}
}
...
MaterialTemplateSource = GenerateMaterialTemplateHLSL(InCompilerTarget.ShaderPlatform,
InOutMaterial,
EmitContext,
Declarations.ToString(),
SharedCode.ToString(),
VertexCode.ToString(),
InputPixelCodePhase0,
InputPixelCodePhase1,
SubsurfaceProfileShaderCode,
OutCompilationOutput);
}
```
调用GenerateMaterialTemplateHLSL()
### 是否需要Toon
在材质中:
```c++
@ -459,8 +413,39 @@ bool FDeferredShadingSceneRenderer::ShouldRenderToonDataPass() const
从3开始0、1、2已被占用。
- ?
## ToonData
## ToonBufferData
- ToonObjectID
```c++
struct FSceneDataIntermediates
{
uint PrimitiveId;
uint InstanceId;
uint ViewIndex;
uint CullingFlags;
// Index from which we load the instance info, needed for the
uint InstanceIdLoadIndex;
FInstanceSceneData InstanceData;
FPrimitiveSceneData Primitive;
};
struct FVertexFactoryIntermediatesCommon
{
/** Cached primitive and instance data */
FSceneDataIntermediates SceneData;
#if USE_INSTANCING || USE_INSTANCE_CULLING
FVertexFactoryInstanceInput InstanceInput;
#endif
#if USE_SPLINEDEFORM
FSplineMeshShaderParams SplineMeshParams;
#endif
};
FPrimitiveSceneData GetPrimitiveData(FVertexFactoryIntermediatesCommon Intermediates)
{
return Intermediates.SceneData.Primitive;
}
```
## 高光
- PBR高光使用Roughness控制是否可行是否需要传入GBuffer一个Mask贴图

View File

@ -1,7 +1,8 @@
# 已看视频
- 住范儿
- [x] [装修小白扫盲指南](https://space.bilibili.com/454560170/channel/collectiondetail?sid=38426 "装修小白扫盲指南")
- [ ] [合集·真实人家·装修全记录](https://space.bilibili.com/454560170/channel/collectiondetail?sid=145028)
- [x] ~~合集·真实人家·装修全记录~~没有意义
- [x] [BUY家攻略](https://space.bilibili.com/454560170/channel/collectiondetail?sid=705850 "BUY家攻略")
- 阳仔的装修思路
- [小东聊家装](https://space.bilibili.com/1881219345):https://www.bilibili.com/video/BV1vJ4m1a7Tg/?spm_id_from=333.1007.top_right_bar_window_default_collection.content.click&vd_source=d47c0bb42f9c72fd7d74562185cee290
- 感觉还行的装修案例
@ -62,9 +63,11 @@
# 电器
- 洗碗机
- https://www.bilibili.com/video/BV1DP4y1Z7Lt/?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290
- 品牌考虑美的、西门子。4000~6000
- 选完洗碗机再考虑橱柜。这样可以与橱柜保持面板统一。**门板厚度**与**颜色**
- 人多12套人少6套。
- 软水片 + 洗碗耗材
- 中央空调
- https://www.bilibili.com/video/BV1Ue411J7Sv/?spm_id_from=333.1007.tianma.1-1-1.click&vd_source=d47c0bb42f9c72fd7d74562185cee290
- 分为氟机与水机两种类型。
@ -122,6 +125,12 @@
# 费用
- 电器
- 中央空调大金2.8w
-
- 洗烘套装1w~1.2w
- 冰箱2000~7000
- 热水器+小厨宝: 2000左右
- 电视机75寸 3000~8000
- 洗碗机西门子sj436B00QC 6299、美的RX600s4599~GX1000S 8999
- 新风系统1w5~2W有耗材费一年24小时开2000块。半年~一年、噪音。南方没必要
- 新风没有除甲醛功能。
- 新风没有除甲醛功能。
- 全屋净水:没有必要。
- 垃圾处理器:几千,不值得购买。