Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

UnityDrawCustomIndirectObjects

演示关于如何渲染几十万量级相同对象 1.实现了纯GPU的渲染流程 2.实现视锥剔除算法(Computer Shader) 3.实现了HZ算法 4.可以自定义网格和Shader,并且支持ASE的Shader( ASE 需要自定义编辑模板文件,模板文件我就不传了 把vertex方法改一下instanceid就行)

代码仅供参考,由于我的项目需求不一样, hz算法部分只进行了实现,如果要加入工作流可能需要你自己再进行一定的更改 另外 hz算法在未启动时 编辑视窗可能有一些小问题,这是因为编辑器视窗的渲染流程不太一致, 启动游戏后应该就好了

要导入URP管线, 然后将管线文件配置好就可以了 image image image

部分实现参考了: https://github.com/ellioman/Indirect-Rendering-With-Compute-Shadershttps://zhuanlan.zhihu.com/p/396979267#comment-10019966137?notificationId=1455556800368558080

About

演示关于如何渲染几十万量级相同对象

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages