Skip to content

Instantly share code, notes, and snippets.

@yumayanagisawa
yumayanagisawa / aurora.shader
Last active January 31, 2023 19:36
Aurora Shader
//Code is converted to use in Unity(ShaderLab) from
//Auroras by nimitz 2017 (twitter: @stormoid)
//on Shadertoy(https://www.shadertoy.com/view/XtGGRt)
Shader "Aurora/aurora"
{
Properties
{
@yumayanagisawa
yumayanagisawa / template.shader
Created July 3, 2017 17:15
Convert GLSL Sandbox to Unity ShaderLab
Shader "Custom/template" {
Properties {
/*
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
*/
}
SubShader {
@yumayanagisawa
yumayanagisawa / First.compute
Last active November 20, 2021 23:33
Unity | Compute Shader Particle System
#pragma kernel CSParticle
// Particle's data
struct Particle
{
float3 position;
float3 velocity;
float life;
};
@yumayanagisawa
yumayanagisawa / warp_shadertoy.shader
Last active August 27, 2021 02:20
Shadertoy to Unity (GLSL to HLSL)
Shader "Custom/warp_shadertoy" {
Properties{
/*
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
*/
}
SubShader{
@yumayanagisawa
yumayanagisawa / CurlNoise.compute
Last active August 18, 2021 01:35
Unity3D | Curl Noise x Compute Shader
// https://github.com/keijiro/NoiseShader
#include "HLSL/SimplexNoise3D.hlsl"
#pragma kernel CSParticle
// Particle's data
struct Particle
{
float3 position;
float3 velocity;
@yumayanagisawa
yumayanagisawa / swirl.shader
Created November 1, 2017 15:43
Unity | Swirl Shader
// Ref: http://www.geeks3d.com/20110428/shader-library-swirl-post-processing-filter-in-glsl/
// Swirl Effect for Unity
Shader "Custom/swirl" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
}
@yumayanagisawa
yumayanagisawa / Procedural.shader
Created November 11, 2017 13:41
Shadertoy to Unity | Julia - Quaternion
// The code is based on the shader on Shadertoy(https://www.shadertoy.com/view/MsfGRr), and tweaked for use in Unity3D
// Original shader is...
// Created by inigo quilez - iq/2013
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Shader "Custom/Procedural" {
Properties
{
_MainTex("Texture", 2D) = "white" {}
@yumayanagisawa
yumayanagisawa / Gem_CameraSpace.shader
Created May 4, 2018 19:27
Experiment with "_WorldSpaceCameraPos" in Unity3D
// based on this shader (https://assetstore.unity.com/packages/vfx/shaders/gem-shader-3)
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "FX/Gem_CameraSpace"
{
Properties {
[HDR] _Color ("Color", Color) = (1,1,1,1)
_ReflectionStrength ("Reflection Strength", Range(0.0,2.0)) = 1.0
_EnvironmentLight ("Environment Light", Range(0.0,2.0)) = 1.0
@yumayanagisawa
yumayanagisawa / Architecture_Base_Unlit.shader
Created May 2, 2018 08:03
Experiment with "_WorldSpaceCameraPos"
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
Shader "Unlit/Architecture_Base_Unlit"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_Color("Color", Color) = (1,1,1,1)
_Luminosity("Luminosity", Float) = 10
_ArchitectureScale("Arch Scale", Float) = 30
@yumayanagisawa
yumayanagisawa / CustomColorGrading.shader
Last active April 17, 2018 10:13
Saturation Filter for Unity3D
// This shader is hugely based on "saturation" by megaloler (https://www.shadertoy.com/view/XttGWB)
Shader "Hidden/CustomColorGrading"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_saturation("saturation value", Float) = 0.3
}
SubShader