Skip to content

Instantly share code, notes, and snippets.

@aobond2
aobond2 / ObjectShader
Last active October 1, 2021 18:10
Cube shader
Shader "Custom/ObjectDiffuseStencil" {
Properties {
_Color("Color", Color) = (1,1,1,1)
_myDiffuse ("Diffuse Texture", 2D) = "white" {}
_myBump ("Bump Texture", 2D) = "bump" {}
_mySlider ("Bump Amount", Range(0,10)) = 1
_SRef("Stencil Ref", Float) = 1
[Enum(UnityEngine.Rendering.CompareFunction)] _SComp("Stencil Comp", Float) = 8
[Enum(UnityEngine.Rendering.StencilOp)] _SOp("Stencil Op", Float) = 2