[RS] 渲染相关项目设置

环境

  • Unity 2020.3.2f1
  • 渲染管线:URP

Project Settings - Graphics

Unity - Manual: Graphics (unity3d.com)

1. Shader Stripping
1. Lightmap modes:Custom
  • Baked Non-Directional:Enable
  • Baked Directional:Enable
  • Realtime Non-Directional:Disable
  • Realtime Directional:Disable
  • Baked Shadowmask:Enable
  • Baked Subtractive:Disable
2. Fog Modes:Custom
  • Linear:Enable
  • Exponential:Enable
  • Exponential Squared:Disable
3. Instancing Variants:Strip Unused

GPU instancing相关变体剔除

2. Shader loading
  • Log Shader Compilation:Disable
    每次Shader编译完成后,输出Shader信息


Project Settings - Quality

Unity - Manual: Quality (unity3d.com)

1. Rendering
  • Texture Quality:Full Res
  • Anisotropic Textures:Per Texture
    每个Texutre单独设置各向异性
  • Realtime Reflection Probes:Disable
  • Billboards Face Camera Position:Enable
  • Resolution Scaling Fixed DPI Factor:1
  • Texture Streaming:Disable
2. Shadows
  • Shadowmask Mode:Shadowmask
3. Other
  • Skin Weights:4 Bones
    动画期间可以影响给定顶点的骨骼数量。

  • V Sync Count:Don’t Sync
    设置垂直同步频率
    Unity | 优化(一):V Sync Count

  • Lod Bias:1

  • Maximum LOD Level:0

  • Particle Raycast Budget:512
    粒子碰撞检测的预算

  • Async Upload Time Slice:2
    将缓存的Texture和Mesh上传到 GPU 时花费的 CPU 时间量(毫秒/帧)

  • Async Upload Buffer Size:16
    将Texture和Mesh串流到 GPU 的异步上传缓冲区大小( MB )

  • Async Upload Persistent Buffer:Enable



Pipeline参数(URP Asset)

Universal Render Pipeline Asset | Universal RP | 10.3.2 (unity3d.com)

1. General
  • Depth Texture:Enable
    URP创建 _CameraDepthTexture
  • Opaque Texture:Disable
    禁用 _CameraOpaqueTexture
  • Terrain Holes:Enable
    禁用的话,Unity打包时会删除相关变体,减少Build时间。

2. Quality
  • HDR:Enable
  • MSAA:Disable

3. Lighting
  1. Main Light:Per Pixel
  • Cast Shadows:Enable
  • Shadow Resolution:2048
  1. Additional Light:Per Pixel
  • Per Object Limit:8
  • Cast Shadows:Enable
  • Shadow Resolution:512

4. Shadows
  • Max Distance:115.4
    Unity相机渲染阴影的最远距离

  • Working Unit:Metirc(米)
    Unity级联阴影距离的度量单位

  • Cascade Count:1
    级联数,值越大采样次数越多
    Unity - Manual: Shadow Cascades (unity3d.com)

  • Depth Bias:1
    Depth Bias(深度偏移)_weixin_30475039的博客-CSDN博客

  • Normal Bias:1
    Unity - Manual: Shadow troubleshooting (unity3d.com)
    关于ShadowMap中Shadow acne现象的解释 - 知乎 (zhihu.com)

  • Soft Shadows:Disable
    软阴影会让阴影效果更柔和,但极大拉低性能

Soft shadows have a greater rendering overhead than hard shadows but this only affects the GPU and does not cause much extra CPU work.


5. Post-processing

后期处理 - Unity 手册

  • Grading Mode:High Dynamic Range
  • LUT Size:32
    Color Grading使用的LUT贴图的尺寸
    基于物理的渲染—HDR Tone Mapping - UWA Blog (uwa4d.com)

6. Advanced
  • SRP Batcher:Enable
    大量不同材质,使用相同Shader时,SRP Batcher能提升CPU渲染性能(不影响GPU)

  • Dynamic Batching:Disable
    动态批,会自动将共享相同材质的小物件进行合并。如果目标硬件支持GPU Instancing,需要禁用动态批。
    动态批,是在CPU将所有GameObject的顶点转换到世界空间,只有该操作消耗比DrawCall小时,才有用。
    Unity - Manual: Draw call batching (unity3d.com)

  • Mixed Lighting:Enable

  • Debug Level:Profiling

  • Shader Variant Log Level:All

你可能感兴趣的:([RS] 渲染相关项目设置)