Furkan Karakocaoglu 33ca9aadd3 Tested new Assets for Visualization of SpatialTime | 2 tahun lalu | |
---|---|---|
.. | ||
.github | 2 tahun lalu | |
.yamato | 2 tahun lalu | |
Documentation~ | 2 tahun lalu | |
Editor | 2 tahun lalu | |
Materials | 2 tahun lalu | |
Runtime | 2 tahun lalu | |
Scenes | 2 tahun lalu | |
Scratch | 2 tahun lalu | |
Shaders | 2 tahun lalu | |
Tests | 2 tahun lalu | |
.editorconfig | 2 tahun lalu | |
.gitattributes | 2 tahun lalu | |
.gitignore | 2 tahun lalu | |
.npmignore | 2 tahun lalu | |
CHANGELOG.md | 2 tahun lalu | |
CHANGELOG.md.meta | 2 tahun lalu | |
CONTRIBUTING.md | 2 tahun lalu | |
CONTRIBUTING.md.meta | 2 tahun lalu | |
Editor.meta | 2 tahun lalu | |
LICENSE.md | 2 tahun lalu | |
LICENSE.md.meta | 2 tahun lalu | |
Materials.meta | 2 tahun lalu | |
README.md | 2 tahun lalu | |
README.md.meta | 2 tahun lalu | |
Runtime.meta | 2 tahun lalu | |
Scenes.meta | 2 tahun lalu | |
Scratch.meta | 2 tahun lalu | |
Shaders.meta | 2 tahun lalu | |
Tests.meta | 2 tahun lalu | |
package.json | 2 tahun lalu | |
package.json.meta | 2 tahun lalu |
An XR-Optimized line renderer that is also capable of producing very inexpensive glow effects. The XRLineRenderer mimics rendering with 3d capsules while only using two quads worth of geometry.
Import the XRLineRenderer package in your project.
Add a XRLineRenderer or XRTrailRenderer component to your gameobject. The interface is nearly identical to the built in Unity Line and Trail Renderers.
Create a new material using the XRLineRenderer shaders. You can find some examples in XRLineRenderer\Materials
Apply this material to the mesh renderer of your XRLineRenderer or XRTrailRenderer.
You will find five shader variants under the XRLineRenderer category. Each of these corresponds to a shader blend mode. Max Color and Min Color are the cheapest variants - if you are using the line renderer to mimic glow effects these variants also are stable in that color will not blow out.
Explanation of interesting shader parameters: Line Rendering Levels - This allows control over the blend between the inner(most opaque/intense) part of the line and outer(transparent) area. Adjust the level curve to 0 will give a very glow-like effect while setting the cruve to 1 will make the line completely solid.
Line Scaled by Depth - Turning this option off means the line will stay the same thickness regardless of your distance from it. This is excellent for drafting lines and also for simulating glow. Radius minimum and maximum allow you to clamp this size adjustment.
The Scripts\Meshchain class provides everything you need to make your own custom line rendering constructs. XRLineRenderer and XRTrailRenderer emulate what the classic Unity components provide, but there are many more use cases out there.
If you plan on making changes to The XR Line Renderer and/or contributing back, then you'll need to set the Asset Serialization
property under Edit->Project Settings->Editor to Force Text