This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[ExecuteAlways] | |
public class BezierTest : MonoBehaviour { | |
public int numOfPoints; | |
public float height = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Each #kernel tells which function to compile; you can have many kernels | |
#pragma kernel GrassGeneration | |
struct InputData { | |
float3 position; | |
float3 normal; | |
float3 tangent; | |
}; | |
struct IndirectArgs { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Shader imported from https://docs.chaosgroup.com/display/OSLShaders/Thin+Film+Shader | |
Shader "Custom/ThinFilmIridescence" { | |
Properties { | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
[Normal]_Normal("Normal", 2D) = "bump" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 | |
_ThicknessMin("ThicknessMin", float) = 250 | |
_ThicknessMax("ThicknessMax", float) = 400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/CurveDissolve" | |
{ | |
Properties | |
{ | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Noise("Noise", 2D) = "white" {} | |
_CurveTexture("Curve texture", 2D) = "white" {} | |
_Cutoff("Cutoff", Range(0,1)) = 0 | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Sampler2D" : { | |
"prefix": "sampl", | |
"body": [ | |
"$1(\"$2\", 2D) = \"white\" {}", | |
"sampler2D $1;" | |
], | |
"description": "Makes a sampler2D property" | |
}, | |
"Float" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Experimental.Rendering; | |
public class ShaderTextureCombiner : EditorWindow { | |
//Input textures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
public class TextureCombiner : EditorWindow { | |
//Input textures | |
private Texture2D[] textures = new Texture2D[4]; |