Skip to content

Instantly share code, notes, and snippets.

View NocSchecter's full-sized avatar
:shipit:

Erick Aquino NocSchecter

:shipit:
  • Chetumal, Q. Roo, MX
  • 00:15 (UTC -06:00)
View GitHub Profile
@NocSchecter
NocSchecter / Form1.cs
Created May 4, 2020 21:22 — forked from AlexKorsakov/Form1.cs
C# Wake On Lan Program
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
public class ClippableObject : MonoBehaviour
{
//only 3 clip planes for now, will need to modify the shader for more.
private int _clipPlanes = 4;
public Material[] _materials;
public GameObject _planeX;
public GameObject _planeXnegative;
Shader "Custom/StandardClippable" {
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5
[Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 0.0
#ifndef PLANE_CLIPPING_INCLUDED
#define PLANE_CLIPPING_INCLUDED
//Plane clipping definitions. Uses three planes for clipping, but this can be increased if necessary.
#if CLIP_ONE || CLIP_TWO || CLIP_THREE || CLIP_FOUR
//If we have 1, 2 or 3 clipping planes, PLANE_CLIPPING_ENABLED will be defined.
//This makes it easier to check if this feature is available or not.
#define PLANE_CLIPPING_ENABLED 1