/Neitri-Unity-Shaders

A compilation of shaders for Unity3D and VRChat

Primary LanguageShaderLabThe UnlicenseUnlicense

Neitris-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

Shader 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.

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 🚪💡

Censor 🚪

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

Credits

mel0n - Wireframe shaders idea

Merlin - Wireframe Fade