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
#pragma kernel CSParticle | |
// Particle's data | |
struct Particle | |
{ | |
float3 position; | |
float3 velocity; | |
float life; | |
}; |
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/Artificial" { | |
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 { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 |
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
// 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" {} |
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/DrawStar" { | |
SubShader | |
{ | |
Pass | |
{ | |
Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" } | |
LOD 100 | |
ZWrite Off |
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/Interactive" { | |
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 | |
targetTexCoordx("targetTexCoordx", Range(0,1)) = 0.0 | |
targetTexCoordy("targetTexCoordy", Range(0,1)) = 0.0 | |
} | |
SubShader { |
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
// 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 | |
} |
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
//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 | |
{ |
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; | |
public class TerrainGenerator : MonoBehaviour { | |
public int depth = 20; | |
public int width = 256; | |
public int height = 256; |
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
private Matrix4x4 q1; // identity | |
public void Update(Camera cam, Matrix4x4 m) | |
{ | |
/* | |
some code... | |
*/ | |
// matrix stuff | |
Matrix4x4 v = cam.worldToCameraMatrix; |
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/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{ |