Unity3D - Shader for sprite clipping
I am trying to create a shader that can be used to clip 2D sprites in a game, I found this shader in another question
Shader "Sprites/ClipArea"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
_Length ("Length", Range(0.0, 1.0)) = 1.0
_Width ("…
how to set a boolean property in unity3d CGprogram shader?
I am writing a shader for unity3d and I want to specify the properties of the shader in i.e like -
Shader "GraphicsQuality/MediumScan" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Specular Color", Color) = (0.5,0.5,0.5,1)
_Shininess ("Shininess", Range (0.01, 1)) = 0.078125
_MainTex ("Base (…