项目作者: MerlinVR

项目描述 :
Proposed blit component for avatars and worlds to use in VRChat
高级语言: C#
项目地址: git://github.com/MerlinVR/Blit-Component.git
创建时间: 2018-10-26T01:12:14Z
项目社区:https://github.com/MerlinVR/Blit-Component

开源协议:MIT License

下载


Blit Component

Updated more complete description and implementation https://gist.github.com/MerlinVR/bcbb3a51336fb9a2806fce484152875f

Proposed blit component for avatars and worlds to use in VRChat

Canny post here:
https://vrchat.canny.io/feature-requests/p/graphicsblit-scripts

This allows much lower CPU overhead for using render texture loops to run stateful logic in shaders for avatars and worlds. It is approximately 10x as fast as using Camera components on the CPU side since blit does not need to run culling an a number of other things. This brings each pass from ~0.3ms to ~0.03ms.

Example using the blit component with GPU particles

Example Scene

BlitExample.unitypackage contains a complete setup of both the blit component loop and the camera loop that is commonly used in VRC. If you press play, both of the large quads should fade from black to white and then loop back to black.

Scene

Example scene game object configuration

Hierarchy
BlitController

Update0 and Update1 are identical, except the source and target textures are flipped on the BlitComponent.

BlitComponent