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/SvenssonToonLighting" | |
{ | |
Properties | |
{ | |
[Header(Diffuse)] | |
_MainTex ("Main Texture", 2D) = "white" {} | |
_Color ("Albedo", color) = (1., 1., 1., 1.) | |
_ToonRamp("Toon ramp", 2D) = "white" {} | |
_ShadowColor ("Shadow color", color) = (1., 1., 1., 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
Shader "Custom/SSS" { | |
Properties { | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_NormalMap ("MormalMap", 2D) = "white" {} | |
_Thickness ("Thickness", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 | |
_Distortion("Distortion", Range(0,1)) = 0.0 | |
_Power("Power", Range(0,10)) = 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
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "Custom/GrassGeometryShader" { | |
Properties{ | |
_Color("Color", Color) = (1,1,1,1) | |
_MainTex("Albedo (RGB)", 2D) = "white" {} | |
_TrampleTex("Trample Texture", 2D) = "white" {} | |
_Glossiness("Smoothness", Range(0,1)) = 0.5 | |
_Metallic("Metallic", Range(0,1)) = 0.0 | |
_GrassHeight("Grass Height", Float) = 0.25 |
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 FireParticleSimulation : MonoBehaviour | |
{ | |
struct Particle | |
{ | |
public Vector3 startPos; |
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 Cakewalk.IoC.Core; | |
public class ExampleBootStrapper : BaseBootStrapper { | |
public override void Configure(Container container) { | |
container.Register<IExampleClass, ExampleClass>(); | |
container.Register<ExampleClass2>(); | |
} |
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 UnityEngine; | |
using UnityEngine.Assertions; | |
using Cakewalk.IoC; | |
public class ExampleBehaviour : MonoBehaviour { | |
[Dependency] IExampleClass exampleClass; | |
[Dependency] ExampleClass2 exampleClass2; | |
void Awake() { |
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 UnityEngine; | |
using Cakewalk.Signal; | |
using System.Collections; | |
public class SignalSender : MonoBehaviour { | |
public static Signal<string, int> TestSignal = new Signal<string, int>(); | |
public float eventDelayTime = 1f; | |
public string text = "Hello from SignalSender!"; |
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 UnityEngine; | |
public class SignalListener : MonoBehaviour { | |
public int maxNum = 5; | |
void Start () { | |
Debug.Log(ToString() + "Adding listener.."); | |
SignalSender.TestSignal.AddListener(OnSignal); | |
} | |
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
// Written by: Johan Svensson (https://medium.com/dotcrossdot). | |
Shader "DotCrossDot/Water" { | |
Properties{ | |
// Color | |
_Color("Color", Color) = (0,0,1,1) | |
_SmoothNess("SmoothNess", Range(0.0,1.0)) = 0 | |
_Metallic("Reflectivity", Range(0.0,1.0)) = 0 | |
_WaveFoamDir("Wave foam direction", Vector) = (0,0,0,0) | |
// Distortion (normals and height maps) |
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 UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
// http://framebunker.com/blog/viewing-image-effects-in-the-scene-view/ | |
public class SceneViewFilter : MonoBehaviour { | |
#if UNITY_EDITOR | |
bool hasChanged = false; |
OlderNewer