Skip to content

Instantly share code, notes, and snippets.

View orels1's full-sized avatar
🎮
Making the world better, one texel at a time

orels1 orels1

🎮
Making the world better, one texel at a time
View GitHub Profile
@orels1
orels1 / MatCapTechniques.shader
Created January 29, 2022 08:44 — forked from bgolus/MatCapTechniques.shader
Showing multiple matcap techniques, including a proposed improved method that's no more expensive than the usual fix if you're starting with the world position and world normal.
Shader "Unlit/MatCap Techniques"
{
Properties
{
[NoScaleOffset] _MatCap ("MatCap", 2D) = "white" {}
[KeywordEnum(ViewSpaceNormal, ViewDirectionCross, ViewDirectionAligned)] _MatCapType ("Matcap UV Type", Float) = 2
}
SubShader
{
Tags { "RenderType"="Opaque" }