Skip to content

Instantly share code, notes, and snippets.

@haosizheng
haosizheng / VertexColor.shader
Last active August 23, 2022 05:44
UnityUrpVertexColoredShader
// this shader using vertex color as input and show on meshes' surface.
// have searched a long time but there is no one upload a vertex-colored shader for urp so I made this.
// have a good day.
Shader "Example/VertexColor" {
Properties
{
}
SubShader {
Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" }
@haosizheng
haosizheng / ImageSequenceRecorderWithTransparentBackground.cs
Last active April 14, 2024 14:10 — forked from bitbutter/TransparentBackgroundScreenshotRecorder.cs
Save image sequence in Unity with transparent background.
using UnityEngine;
using System.Collections;
using System.IO;
using UnityEngine.Rendering.Universal;
/*
Usage:
1. Attach this script to your chosen camera's game object.
2. Set that camera's Clear Flags field to Solid Color.
3. Use the inspector to set frameRate and framesToCapture