This file contains hidden or 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 "Seventy Sevian/Pixelated" | |
{ | |
Properties | |
{ | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
_Color ("Color", Color) = (1, 1, 1, 1) | |
_PixelCountU ("Pixel Count U", float) = 100 | |
_PixelCountV ("Pixel Count V", float) = 100 | |
} |
This file contains hidden or 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/GlitterShader" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_NoiseSizeCoeff("_NoiseSizeCoeff (Bigger => larger glitter spots)", Float) = 0.61 | |
_NoiseDensity("NoiseDensity (Bigger => larger glitter spots)", Float) = 53.0 | |
} | |
SubShader |
This file contains hidden or 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/SurfaceStandard" { | |
Properties { | |
_Color("Color", Color) = (1,1,1) | |
_MainTex("Diffuse", 2D) = "white" {} | |
[NoScaleOffset] _SpecGlossMap("Specular", 2D) = "white" {} | |
[NoScaleOffset] _BumpMap("Normal Map", 2D) = "bump" {} | |
_BumpScale("Scale", Float) = 1.0 | |
[NoScaleOffset] _Occlusion("Occlusion", 2D) = "white" {} | |
[NoScaleOffset] _EmissionMap("Emission", 2D) = "black" {} | |
} |
This file contains hidden or 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
// yeah it's not terribly nice | |
Shader "Foo" { | |
SubShader { | |
Pass { | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
#pragma target 3.0 |
This file contains hidden or 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
// Problem is that by default SamplerComparisonState sampler is coupled with the shadowmap. | |
// So if you want to sample it regularly, you'll have to find a suitable sampler from another used texture. | |
// For example, let's say _MainTex has a suitable sampler (set to bilinear, whatever). | |
UNITY_DECLARE_TEX2D(_MainTex); // will declare Texture2D _MainTex and SamplerState sampler_MainTex | |
UNITY_DECLARE_SHADOWMAP(_Myshadow); // will declare Texture2D _Myshadow and SamplerComparisonState sampler_Myshadow | |
// sample as a shadowmap with comparison (all platforms) | |
float s = UNITY_SAMPLE_SHADOW_PROJ(_Myshadow, float4(xy,depth,1.0)); |
This file contains hidden or 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 "Mattatz/UVTransform" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_TexScale ("Scale of Tex", Float) = 1.0 | |
_TexRatio ("Ratio of Tex", Float) = 1.0 | |
_Theta ("Rotation of Tex", Float) = 0.0 | |
_PlaneScale ("Scale of Plane Mesh", Vector) = (1, 1, 0, 0) | |
} |
This file contains hidden or 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/Billboard-CastShadow" | |
{ | |
Properties | |
{ | |
_DC ("diffuse", Color) = (0.5,0.5,0.5,1) | |
_SC ("Specular color (RGB), roughness (A)", Color) = (0.5,0.5,0.5,0.5) | |
_Size ("size", Float) = 1 | |
} | |
CGINCLUDE | |
#define UNITY_PASS_SHADOWCASTER |
This file contains hidden or 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/ViewPortToPos" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_VP ("viewport position", Vector) = (0.5,0.5,1,0) | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Opaque" } |
This file contains hidden or 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/Generated-SurfDeferred" { | |
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 | |
} | |
CGINCLUDE | |
#include "HLSLSupport.cginc" |
This file contains hidden or 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 CreateTex3D : EditorWindow | |
{ | |
[MenuItem("sugi.cho/Window/CreatePerlin3DTexture")] | |
public static void Init () | |
{ | |
EditorWindow window = EditorWindow.GetWindow (typeof(CreateTex3D)); |
OlderNewer