Skip to content

Instantly share code, notes, and snippets.

@alhvi
alhvi / billboard.shader
Last active August 14, 2025 20:52 — forked from kaiware007/billboard.shader
Simple Billboard shader for Unity
// Original shader from https://gist.github.com/kaiware007/8ebad2d28638ff83b6b74970a4f70c9a
// Adapted to URP with instructions from https://docs.unity3d.com/Packages/[email protected]/manual/writing-shaders-urp-basic-unlit-structure.html
// And using code from https://gist.github.com/kaiware007/8ebad2d28638ff83b6b74970a4f70c9a?permalink_comment_id=4464811#gistcomment-4464811
Shader "Unlit/Billboard"
{
Properties
{
[MainTexture] _BaseMap ("Texture", 2D) = "white" {}
}
@Spongert
Spongert / TMPro-Billboard.shader
Created July 5, 2019 12:14
Unity TextMeshPro Billboard / always facing camera shader
Shader "TextMeshPro/Distance Field-BillboardFacing"
{
// Billboarding version for TextMeshPro (tested in 2018.3), based on default Distance Field shader.
// ** Important part is to DISABLE the dynamic batching! (happens in this shader) **
// ...Took a while to figure out that one.
//
// Use as you like!
// - Almar
@smkplus
smkplus / UnityShaderCheatSheet.md
Last active October 22, 2024 12:19
Controlling fixed function states from materials/scripts in Unity

16999105_467532653370479_4085466863356780898_n

Shader "MaterialPropertyDrawer"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
 
[HideInInspector] _MainTex2("Hide Texture", 2D) = "white" {}
@DashW
DashW / ScreenRecorder.cs
Last active November 12, 2025 14:51
ScreenRecorder - High Performance Unity Video Capture Script
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
class BitmapEncoder
{
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData)
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active October 31, 2025 16:45
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: