美文网首页
[RS] 渲染相关项目设置

[RS] 渲染相关项目设置

作者: _Walker__ | 来源:发表于2021-07-30 15:35 被阅读0次

环境

  • 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

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 手册


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] 渲染相关项目设置

      本文链接:https://www.haomeiwen.com/subject/uvcfvltx.html