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
namespace MyTool | |
{ | |
using System; | |
using UnityEditor; | |
using UnityEngine; | |
using System.Linq; | |
using UnityEngine.Rendering; | |
public class ShaderKeywordCollector : EditorWindow | |
{ |
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
// Original : https://www.shadertoy.com/view/MdXyzX | |
// afl_ext 2017-2023 | |
// Now with 2023 refresh | |
// MIT License | |
// Use your mouse to move the camera around! Press the Left Mouse Button on the image to look around! | |
#define DRAG_MULT 0.28 // changes how much waves pull on the water | |
#define WATER_DEPTH 1.0 // how deep is the water | |
#define CAMERA_HEIGHT 1.5 // how high the camera should be |
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.ShaderGraph; | |
using System.Reflection; | |
[Title("Utility", "Graph Preview")] | |
public class GraphPreviewNode : CodeFunctionNode | |
{ | |
protected override MethodInfo GetFunctionToConvert() | |
{ | |
return GetType().GetMethod("MyCustomFunction", |
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.ShaderGraph; | |
using System.Reflection; | |
/// <summary> | |
/// ドメインワーピング(http://www.iquilezles.org/www/articles/warp/warp.htm) | |
/// </summary> | |
[Title("Custom", "Domain Warping(@iquilezles)")] | |
public class DomainWarpingNode : CodeFunctionNode | |
{ |
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; | |
using UnityEditor.ShaderGraph; | |
using System.Reflection; | |
[Title("Distance", "Triangle")] | |
public class TriangleNode : CodeFunctionNode | |
{ | |
public TriangleNode() |
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; | |
using UnityEditor.ShaderGraph; | |
using System.Reflection; | |
[Title("Distance", "Hexagon")] | |
public class HexagonNode : CodeFunctionNode | |
{ | |
public HexagonNode() |
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/GaussianBlur" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_Variance ("Variance", Float) = 1.0 | |
_Range ("Range (px)", Float) = 5.0 | |
_GaussianSum ("Gaussian Sum", Float) = 1.0 | |
_KernelSize ("Kernel Size", Float) = 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
using UnityEngine; | |
using UnityEngine.Rendering; | |
| |
namespace Study | |
{ | |
public class ColorAndDepthPipeline : RenderPipeline | |
{ | |
private static readonly int ColorAttachmentId = Shader.PropertyToID("_CameraColorAttachment"); | |
private static readonly int DepthAttachmentId = Shader.PropertyToID("_CameraDepthAttachment"); | |
private static UnityEngine.Experimental.Rendering.GraphicsFormat ColorFormat = SystemInfo.GetGraphicsFormat(UnityEngine.Experimental.Rendering.DefaultFormat.LDR); |
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/SimpleTess" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_TessFactor ("Tess Factor", Vector) = (1, 1, 1, 1) // テセレーション係数 (メッシュをどれくらい分割するかを決定する) | |
} | |
SubShader | |
{ | |
Tags |
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/CustomImageEffect" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
// No culling or depth | |
Cull Off ZWrite Off ZTest Always |
NewerOlder