• Stars
    star
    312
  • Rank 134,133 (Top 3 %)
  • Language ShaderLab
  • License
    Other
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Collection of shaders for Unity3D and VRChat

Neitri-Unity-Shaders

Collection of shaders for Unity3D and VRChat. World Normal and World Positon shaders have been used as basis for more interesting advanced effects, such as:

  • triplanar decals
  • color wave
  • distortion wave
  • cover everything in texture

Simple shaders

Types

  • Shader marked with ๐Ÿšช render what is behind them with some effect, they don't go on your avatar but ideally on some "window" that you will look thru. Post processing might ruin results of these shaders.

  • Shader marked with ๐Ÿ’ก need _CameraDepthTexture, to ensure _CameraDepthTexture is enabled please add a directional Light anywhere to your avatar (idally enabled only when the "window" is enabled) and set it's properties in the following way:

    The settings above should be optimized enough to not cause any additional render passes, if they do, the render passes should be low resolution. Intensity value has to be over 0, because if it's 0 Unity considers the light as disabled. You need to do this because Unity's forward rendering _CameraDepthTexture is enabled only if world has at least one light with shadows enabled or if game maker sets Camera.main.depthTextureMode = DepthTextureMode.Depth. Shaders that use depth texture will be more imprecise or noisy the further you are from position 0,0,0. That is due to the nature of floating point numbers, it's a Unity thing.

Censor ๐Ÿšช

Both VR and non VR see same censor squares.
Censor square size decreases as distance to it increases.

Clispace Raymarching ๐Ÿšช

Example on how to construct world space ray from clispace uv. Useful as start for fully raymarched worlds.

Wireframe Overlay ๐Ÿšช๐Ÿ’ก

Overlays background color on top of original scene.

Wireframe Fade ๐Ÿšช๐Ÿ’ก

Fades into original scene color.

World Normal Nice Slow ๐Ÿšช๐Ÿ’ก

Slow because it uses two passes instead of one.

World Normal Ugly Fast ๐Ÿšช๐Ÿ’ก

Fast because it uses one pass, ugly because it uses ddx and ddy which work in 2x2 blocks.

World Position ๐Ÿšช๐Ÿ’ก

World Cutout Sphere ๐Ÿšช๐Ÿ’ก

Efficient single pass world cutout shader. Uses ray sphere intersection, so works only as spherical cutout.

Distance Fade Outline ๐Ÿ’ก

Fades outline (aka rim lighting) based on how far it is behind objects and how far it is from camera. Add it to bottom of material list in Renderer component, so whole object is rendered again with this material. Used in migero's Foosball 1vs1 Or 2vs2

Distance Fade Cube Volume

Ported Shadertoy

Shaders ported from Shadertoy

Candy core 2

https://www.shadertoy.com/view/4sVXDz

Prefabs/Worlds

Complex combination of shaders and specifc mesh/component/camera. Contains premade prefabs or example worlds.

Depth Mirror

GPU Particles

Example World

Grafitti Wall

Example World Weak attempt at clone of Just Graffitiวƒ by: nyakome

Neitri Clock

Most up to date versions of my clock. Also distributed thru VRCMods

Shader Debug

Prefab that helps with world light debugging. I use it to debug issues with my Neitri MMD shader.

Wireframe Projector

Wireframe Projector Prefab inspired by the one found Avatar Testingโ€ผ by Mimi's

Neitri MMD

Shader I'am using on my avatar. More info...

Credits

Everyone in "VRC Shader Development" discord

Mel0n - Wireframe Overlay idea
Merlin - Wireframe Fade
migero - Distance Fade Outline idea
Nave - Script to generate 1 vert + X triangles mesh for Depth Mirror and GPU Particles
error.mdl - original Depth Mirror idea, single texture fetch triplanar
ScruffyRules - help with Depth Mirror debugging
Dj Lukis.LT - correct depth sampling with oblique view frustums
d4rkpl4y3r - Shader Debug HDR detection idea