Skip to content

Instantly share code, notes, and snippets.

@Split82
Split82 / UnityShadersCheatSheet.shader
Created April 17, 2018 10:07
Unity Shaders Cheat Sheet
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
@fuqunaga
fuqunaga / CalculateObliqueMatrix
Created September 4, 2018 05:22
CalculateObliqueMatrix inplement
// https://forum.unity.com/threads/oblique-near-plane-clipping.194722/
public class Clipper : MonoBehaviour
{
Matrix4x4 projection;
Camera offscreenCam;
void Start ()
{
projection = camera.projectionMatrix;
}
@markeahogan
markeahogan / InspectorCapture.cs
Created August 3, 2023 07:02
Adds method to save the whole inspector to a screenshot
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
/// <summary>
/// Provides functionality for screenshotting full editor windows, and the inspector in particular