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 UnityEditor; | |
using System.Collections; | |
public class LightProbeRebuilderWindow : EditorWindow | |
{ | |
string text = "Paste extracted coefficients here."; | |
float multiplier = 1.0f; | |
[MenuItem("Window/Light Probe Rebuilder")] |
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
/* | |
optimized-ggx.glsl | |
This file describes several optimizations you can make when creating a GGX shader. | |
AUTHOR: John Hable | |
LICENSE: | |
This is free and unencumbered software released into the public domain. |
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 UnityEditor; | |
using UnityEditorInternal; | |
using System.Collections.Generic; | |
using UnityEditor.AnimatedValues; | |
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)] | |
[CanEditMultipleObjects] | |
public class CustomEditorBase : Editor | |
{ |
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
public class FGlowShader : FShader | |
{ | |
private float _glowAmount; | |
private Color _glowColor; | |
public FGlowShader(float glowAmount,Color glowColor) : base("GlowShader", Shader.Find("Futile/Glow")) | |
{ | |
_glowAmount = glowAmount; | |
_glowColor = glowColor; | |
needsApply = true; |
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 "Volund/Standard Scatter (Metallic, Surface)" { | |
Properties { | |
_Color("Color", Color) = (1,1,1,1) | |
_MainTex("Albedo", 2D) = "white" {} | |
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 | |
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5 | |
[Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 0.0 | |
_MetallicGlossMap("Metallic", 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
#ifndef UNITY_STANDARD_BRDF_INCLUDED | |
#define UNITY_STANDARD_BRDF_INCLUDED | |
#include "UnityCG.cginc" | |
#include "UnityStandardConfig.cginc" | |
#include "UnityLightingCommon.cginc" | |
//------------------------------------------------------------------------------------- | |
// Legacy, to keep backwards compatibility for (pre Unity 5.3) custom user shaders: | |
#define unity_LightGammaCorrectionConsts_PIDiv4 (IsGammaSpace()? (UNITY_PI/4)*(UNITY_PI/4): (UNITY_PI/4)) |
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 "Unlit/UnlitCastShadow" | |
{ | |
Properties | |
{ | |
_MainTex("Texture", 2D) = "white" {} | |
} | |
CGINCLUDE | |
#include "UnityCG.cginc" | |
struct appdata |
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
//#if UNITY_EDITOR | |
//#define DEBUG | |
//#endif | |
using UnityEngine; | |
using System.Collections; | |
using System; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using UnityEngineInternal; |
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 "Hidden/ComputeOcclusion" | |
{ | |
Properties | |
{ | |
_MainTex ("", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
Pass | |
{ |
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 UnityEditor; | |
using System; | |
using System.Collections; | |
[CustomPreview(typeof(YourCustomScriptableObject))] // THIS IS VERY IMPORTANT, this is so the editor knows what this is supposed to be previewing at all | |
public class SkinnedMeshObjectPreviewExample : ObjectPreview { | |
PreviewRenderUtility m_PreviewUtility; |
OlderNewer