浏览代码

Update README.md

/Shaders2019
GitHub 5 年前
当前提交
c0474326
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13
      README.md

13
README.md


The Fog scene includes AR plane finding and placement scritps to place a virtual object in AR that uses the standard shader. The scene has fog enabled in the [Lighting Settings window](https://docs.unity3d.com/Manual/lighting-window.html). It's set to an end distance of 35 and a UI slider that changes the scene fog between 1-35 is configured in the scene. Manipulating this slider will change the appearance of the density of the fog in the scene.
![img](https://user-images.githubusercontent.com/2120584/89490315-6edd0700-d761-11ea-9965-af86a9bbc296.gif)
## Wireframe shader
![MeshViz](https://user-images.githubusercontent.com/2120584/90083549-b7e40c80-dcc7-11ea-8dde-0b41eda98c23.png)
This shader enables visualizing the edges of any mesh in Unity. Here we are using it to visualize the runtime mesh generated by ARKit from the AR Mesh Manager. This shader works by combining barycentric data (vertex colors) with a custom Shader graph for determining edges and painting pixels an assigned color.
The MeshVisualization scene is configured to apply the barycentric data at runtime by subscribing to the MeshChanged events in the AR Mesh Manager component. The AR Mesh Manager uses the Mesh Visualization prefab that has a Mesh Filter and Mesh Renderer with an assigned material using the WireFrame shader graph. When meshes are added or updated the barycentric data also gets updated on the mesh enabling this effect.
![MeshViz](https://user-images.githubusercontent.com/2120584/90083497-89fec800-dcc7-11ea-9142-5e93f662695b.gif)
> This sample enables and disables plane tracking by Toggling the AR Plane Manager component. You can see the optimizations with the mesh along flat surfaces when plane tracking is enabled.
正在加载...
取消
保存