mirror of
https://github.com/zoriya/Magical-Garden.git
synced 2025-12-06 07:16:15 +00:00
jj
This commit is contained in:
53
Assets/AnimationVictoire.anim
Normal file
53
Assets/AnimationVictoire.anim
Normal file
@@ -0,0 +1,53 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: AnimationVictoire
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings: []
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
8
Assets/AnimationVictoire.anim.meta
Normal file
8
Assets/AnimationVictoire.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b843e20d7ebfd6e42aa538f0afd9e527
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
78
Assets/BlurrMaterial.mat
Normal file
78
Assets/BlurrMaterial.mat
Normal file
@@ -0,0 +1,78 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: njdifjsgij
|
||||
m_Shader: {fileID: 4800000, guid: 39bf7d608b193b0479edbb06cdcf26f1, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpAmt: 10
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Size: 1.2
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
8
Assets/BlurrMaterial.mat.meta
Normal file
8
Assets/BlurrMaterial.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cb2100ed638f004e991129ea84744aa
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
17
Assets/Gradient de couleur.asset
Normal file
17
Assets/Gradient de couleur.asset
Normal file
@@ -0,0 +1,17 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3}
|
||||
m_Name: New TMP Color Gradient
|
||||
m_EditorClassIdentifier:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
8
Assets/Gradient de couleur.asset.meta
Normal file
8
Assets/Gradient de couleur.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd1fcd458ba3b0a4cb6a60536206e6ab
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
53
Assets/New Animation.anim
Normal file
53
Assets/New Animation.anim
Normal file
@@ -0,0 +1,53 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: New Animation
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings: []
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
8
Assets/New Animation.anim.meta
Normal file
8
Assets/New Animation.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41eeb1ae9ee0ddd4c8801b39c3b5a781
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Standard Assets.meta
Normal file
9
Assets/Standard Assets.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6195a43a0187a34e9c6be23520d3766
|
||||
folderAsset: yes
|
||||
timeCreated: 1436977287
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6
Assets/Standard Assets/Effects.meta
Normal file
6
Assets/Standard Assets/Effects.meta
Normal file
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 115d1f9d9bd29064ab981e57c8fc8cdf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
6
Assets/Standard Assets/Effects/GlassRefraction.meta
Normal file
6
Assets/Standard Assets/Effects/GlassRefraction.meta
Normal file
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c788335fe2df44ca9bbf95bc580ce4d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 194c5f733c7534ed790e101791e86518
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,109 @@
|
||||
// Per pixel bumped refraction.
|
||||
// Uses a normal map to distort the image behind, and
|
||||
// an additional texture to tint the color.
|
||||
|
||||
Shader "FX/Glass/Stained BumpDistort" {
|
||||
Properties {
|
||||
_BumpAmt ("Distortion", range (0,128)) = 10
|
||||
_MainTex ("Tint Color (RGB)", 2D) = "white" {}
|
||||
_BumpMap ("Normalmap", 2D) = "bump" {}
|
||||
}
|
||||
|
||||
Category {
|
||||
|
||||
// We must be transparent, so other objects are drawn before this one.
|
||||
Tags { "Queue"="Transparent" "RenderType"="Opaque" }
|
||||
|
||||
|
||||
SubShader {
|
||||
|
||||
// This pass grabs the screen behind the object into a texture.
|
||||
// We can access the result in the next pass as _GrabTexture
|
||||
GrabPass {
|
||||
Name "BASE"
|
||||
Tags { "LightMode" = "Always" }
|
||||
}
|
||||
|
||||
// Main pass: Take the texture grabbed above and use the bumpmap to perturb it
|
||||
// on to the screen
|
||||
Pass {
|
||||
Name "BASE"
|
||||
Tags { "LightMode" = "Always" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_fog
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
float4 vertex : POSITION;
|
||||
float2 texcoord: TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 vertex : SV_POSITION;
|
||||
float4 uvgrab : TEXCOORD0;
|
||||
float2 uvbump : TEXCOORD1;
|
||||
float2 uvmain : TEXCOORD2;
|
||||
UNITY_FOG_COORDS(3)
|
||||
};
|
||||
|
||||
float _BumpAmt;
|
||||
float4 _BumpMap_ST;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uvgrab = ComputeGrabScreenPos(o.vertex);
|
||||
o.uvbump = TRANSFORM_TEX( v.texcoord, _BumpMap );
|
||||
o.uvmain = TRANSFORM_TEX( v.texcoord, _MainTex );
|
||||
UNITY_TRANSFER_FOG(o,o.vertex);
|
||||
return o;
|
||||
}
|
||||
|
||||
sampler2D _GrabTexture;
|
||||
float4 _GrabTexture_TexelSize;
|
||||
sampler2D _BumpMap;
|
||||
sampler2D _MainTex;
|
||||
|
||||
half4 frag (v2f i) : SV_Target
|
||||
{
|
||||
#if UNITY_SINGLE_PASS_STEREO
|
||||
i.uvgrab.xy = TransformStereoScreenSpaceTex(i.uvgrab.xy, i.uvgrab.w);
|
||||
#endif
|
||||
|
||||
// calculate perturbed coordinates
|
||||
half2 bump = UnpackNormal(tex2D( _BumpMap, i.uvbump )).rg; // we could optimize this by just reading the x & y without reconstructing the Z
|
||||
float2 offset = bump * _BumpAmt * _GrabTexture_TexelSize.xy;
|
||||
#ifdef UNITY_Z_0_FAR_FROM_CLIPSPACE //to handle recent standard asset package on older version of unity (before 5.5)
|
||||
i.uvgrab.xy = offset * UNITY_Z_0_FAR_FROM_CLIPSPACE(i.uvgrab.z) + i.uvgrab.xy;
|
||||
#else
|
||||
i.uvgrab.xy = offset * i.uvgrab.z + i.uvgrab.xy;
|
||||
#endif
|
||||
|
||||
half4 col = tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
|
||||
half4 tint = tex2D(_MainTex, i.uvmain);
|
||||
col *= tint;
|
||||
UNITY_APPLY_FOG(i.fogCoord, col);
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Fallback for older cards and Unity non-Pro
|
||||
|
||||
SubShader {
|
||||
Blend DstColor Zero
|
||||
Pass {
|
||||
Name "BASE"
|
||||
SetTexture [_MainTex] { combine texture }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 963484209d11fd7f110076aa44295342
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
6
Assets/Standard Assets/Effects/ImageEffects.meta
Normal file
6
Assets/Standard Assets/Effects/ImageEffects.meta
Normal file
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6e0c95a128e14227939c51b5d9ad74e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
3
Assets/Standard Assets/Effects/ImageEffects/Readme.txt
Normal file
3
Assets/Standard Assets/Effects/ImageEffects/Readme.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
The old image effects have been deprecated and moved to the Asset Store: https://www.assetstore.unity3d.com/#!/content/83913
|
||||
|
||||
We recommend that you now use the new post-processing stack. You'll find it at https://www.unity3d.com/postprocessing
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb7c1a8482a67664e95e13c16daf3adf
|
||||
timeCreated: 1487856508
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6
Assets/Standard Assets/Effects/ToonShading.meta
Normal file
6
Assets/Standard Assets/Effects/ToonShading.meta
Normal file
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 488ccf78ce5fbe14db33f20cccd9f386
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 280da6451a1e556438ce789a0d7e1f65
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,58 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: ToonBasic
|
||||
m_Shader: {fileID: 4800000, guid: d84268709d11078d11005b9844295342, type: 3}
|
||||
m_ShaderKeywords: []
|
||||
m_CustomRenderQueue: -1
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ToonShade
|
||||
second:
|
||||
m_Texture: {fileID: 8900000, guid: b995d4bd9d11078d11005b9844295342, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _Shininess
|
||||
second: .699999988
|
||||
data:
|
||||
first:
|
||||
name: _Outline
|
||||
second: .00701886788
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: .462686539, g: .462686539, b: .462686539, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _Emission
|
||||
second: {r: 0, g: 0, b: 0, a: 0}
|
||||
data:
|
||||
first:
|
||||
name: _SpecColor
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _OutlineColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
--- !u!1002 &2100001
|
||||
EditorExtensionImpl:
|
||||
serializedVersion: 6
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84b9e1d19d11078d11005b9844295342
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,58 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: ToonBasicOutline
|
||||
m_Shader: {fileID: 4800000, guid: 9ce107479d11178d11005b9844295342, type: 3}
|
||||
m_ShaderKeywords: []
|
||||
m_CustomRenderQueue: -1
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ToonShade
|
||||
second:
|
||||
m_Texture: {fileID: 8900000, guid: b995d4bd9d11078d11005b9844295342, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _Shininess
|
||||
second: .57971698
|
||||
data:
|
||||
first:
|
||||
name: _Outline
|
||||
second: .00659701508
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: .462686539, g: .462686539, b: .462686539, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _Emission
|
||||
second: {r: 0, g: 0, b: 0, a: 0}
|
||||
data:
|
||||
first:
|
||||
name: _SpecColor
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _OutlineColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
--- !u!1002 &2100001
|
||||
EditorExtensionImpl:
|
||||
serializedVersion: 6
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 215977489d11178d11005b9844295342
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,80 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: ToonLit
|
||||
m_Shader: {fileID: 4800000, guid: 48dca5b99d113b8d11006bab44295342, type: 3}
|
||||
m_ShaderKeywords: []
|
||||
m_CustomRenderQueue: -1
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 9ca701319d113f2d1100ff9b44295342, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ToonShade
|
||||
second:
|
||||
m_Texture: {fileID: 8900000, guid: ed7fefe29d117c8d11005e4844295342, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _Ramp
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 4a056241e2722dc46a7262a8e7073fd9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _Shininess
|
||||
second: .699999988
|
||||
data:
|
||||
first:
|
||||
name: _Outline
|
||||
second: .00807547197
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: .50251013, g: .50251013, b: .50251013, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _MainTex_ST
|
||||
second: {r: 1, g: 1, b: 0, a: 0}
|
||||
data:
|
||||
first:
|
||||
name: _Emission
|
||||
second: {r: 0, g: 0, b: 0, a: 0}
|
||||
data:
|
||||
first:
|
||||
name: _SpecColor
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _OutlineColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _ToonShade_ST
|
||||
second: {r: 1, g: 1, b: 0, a: 0}
|
||||
--- !u!1002 &2100001
|
||||
EditorExtensionImpl:
|
||||
serializedVersion: 6
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9e6294c9d11cb8d11006bf944295342
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,65 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: ToonLitOutline
|
||||
m_Shader: {fileID: 4800000, guid: 054a31a99d11e49d110086ba44295342, type: 3}
|
||||
m_ShaderKeywords: []
|
||||
m_CustomRenderQueue: -1
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ToonShade
|
||||
second:
|
||||
m_Texture: {fileID: 8900000, guid: ed7fefe29d117c8d11005e4844295342, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _Ramp
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 4a056241e2722dc46a7262a8e7073fd9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _Shininess
|
||||
second: .699999988
|
||||
data:
|
||||
first:
|
||||
name: _Outline
|
||||
second: .00701492419
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: .50251013, g: .50251013, b: .50251013, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _Emission
|
||||
second: {r: 0, g: 0, b: 0, a: 0}
|
||||
data:
|
||||
first:
|
||||
name: _SpecColor
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _OutlineColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
--- !u!1002 &2100001
|
||||
EditorExtensionImpl:
|
||||
serializedVersion: 6
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d69df9d9d11e49d110086ba44295342
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
6
Assets/Standard Assets/Effects/ToonShading/Shaders.meta
Normal file
6
Assets/Standard Assets/Effects/ToonShading/Shaders.meta
Normal file
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: adec466a1f9044ea78471a5ce6f78271
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,63 @@
|
||||
Shader "Toon/Basic" {
|
||||
Properties {
|
||||
_Color ("Main Color", Color) = (.5,.5,.5,1)
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_ToonShade ("ToonShader Cubemap(RGB)", CUBE) = "" { }
|
||||
}
|
||||
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
Pass {
|
||||
Name "BASE"
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_fog
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
samplerCUBE _ToonShade;
|
||||
float4 _MainTex_ST;
|
||||
float4 _Color;
|
||||
|
||||
struct appdata {
|
||||
float4 vertex : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float3 normal : NORMAL;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 pos : SV_POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float3 cubenormal : TEXCOORD1;
|
||||
UNITY_FOG_COORDS(2)
|
||||
};
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||
o.cubenormal = mul (UNITY_MATRIX_MV, float4(v.normal,0));
|
||||
UNITY_TRANSFER_FOG(o,o.pos);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed4 col = _Color * tex2D(_MainTex, i.texcoord);
|
||||
fixed4 cube = texCUBE(_ToonShade, i.cubenormal);
|
||||
fixed4 c = fixed4(2.0f * cube.rgb * col.rgb, col.a);
|
||||
UNITY_APPLY_FOG(i.fogCoord, c);
|
||||
return c;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "VertexLit"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d84268709d11078d11005b9844295342
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,70 @@
|
||||
Shader "Toon/Basic Outline" {
|
||||
Properties {
|
||||
_Color ("Main Color", Color) = (.5,.5,.5,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_Outline ("Outline width", Range (.002, 0.03)) = .005
|
||||
_MainTex ("Base (RGB)", 2D) = "white" { }
|
||||
_ToonShade ("ToonShader Cubemap(RGB)", CUBE) = "" { }
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata {
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 pos : SV_POSITION;
|
||||
UNITY_FOG_COORDS(0)
|
||||
fixed4 color : COLOR;
|
||||
};
|
||||
|
||||
uniform float _Outline;
|
||||
uniform float4 _OutlineColor;
|
||||
|
||||
v2f vert(appdata v) {
|
||||
v2f o;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
|
||||
float3 norm = normalize(mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal));
|
||||
float2 offset = TransformViewToProjection(norm.xy);
|
||||
|
||||
#ifdef UNITY_Z_0_FAR_FROM_CLIPSPACE //to handle recent standard asset package on older version of unity (before 5.5)
|
||||
o.pos.xy += offset * UNITY_Z_0_FAR_FROM_CLIPSPACE(o.pos.z) * _Outline;
|
||||
#else
|
||||
o.pos.xy += offset * o.pos.z * _Outline;
|
||||
#endif
|
||||
o.color = _OutlineColor;
|
||||
UNITY_TRANSFER_FOG(o,o.pos);
|
||||
return o;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
UsePass "Toon/Basic/BASE"
|
||||
Pass {
|
||||
Name "OUTLINE"
|
||||
Tags { "LightMode" = "Always" }
|
||||
Cull Front
|
||||
ZWrite On
|
||||
ColorMask RGB
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_fog
|
||||
fixed4 frag(v2f i) : SV_Target
|
||||
{
|
||||
UNITY_APPLY_FOG(i.fogCoord, i.color);
|
||||
return i.color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "Toon/Basic"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ce107479d11178d11005b9844295342
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,53 @@
|
||||
Shader "Toon/Lit" {
|
||||
Properties {
|
||||
_Color ("Main Color", Color) = (0.5,0.5,0.5,1)
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_Ramp ("Toon Ramp (RGB)", 2D) = "gray" {}
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf ToonRamp
|
||||
|
||||
sampler2D _Ramp;
|
||||
|
||||
// custom lighting function that uses a texture ramp based
|
||||
// on angle between light direction and normal
|
||||
#pragma lighting ToonRamp exclude_path:prepass
|
||||
inline half4 LightingToonRamp (SurfaceOutput s, half3 lightDir, half atten)
|
||||
{
|
||||
#ifndef USING_DIRECTIONAL_LIGHT
|
||||
lightDir = normalize(lightDir);
|
||||
#endif
|
||||
|
||||
half d = dot (s.Normal, lightDir)*0.5 + 0.5;
|
||||
half3 ramp = tex2D (_Ramp, float2(d,d)).rgb;
|
||||
|
||||
half4 c;
|
||||
c.rgb = s.Albedo * _LightColor0.rgb * ramp * (atten * 2);
|
||||
c.a = 0;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _Color;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex : TEXCOORD0;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
half4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
}
|
||||
|
||||
Fallback "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48dca5b99d113b8d11006bab44295342
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,17 @@
|
||||
Shader "Toon/Lit Outline" {
|
||||
Properties {
|
||||
_Color ("Main Color", Color) = (0.5,0.5,0.5,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_Outline ("Outline width", Range (.002, 0.03)) = .005
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_Ramp ("Toon Ramp (RGB)", 2D) = "gray" {}
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
UsePass "Toon/Lit/FORWARD"
|
||||
UsePass "Toon/Basic Outline/OUTLINE"
|
||||
}
|
||||
|
||||
Fallback "Toon/Lit"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 054a31a99d11e49d110086ba44295342
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
6
Assets/Standard Assets/Effects/ToonShading/Textures.meta
Normal file
6
Assets/Standard Assets/Effects/ToonShading/Textures.meta
Normal file
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 651770f8be26443fdb85aa3594fa349c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
BIN
Assets/Standard Assets/Effects/ToonShading/Textures/ToonLit.psd
Normal file
BIN
Assets/Standard Assets/Effects/ToonShading/Textures/ToonLit.psd
Normal file
Binary file not shown.
@@ -0,0 +1,53 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b995d4bd9d11078d11005b9844295342
|
||||
TextureImporter:
|
||||
fileIDToRecycleName:
|
||||
8900000: generatedCubemap
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 2
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 1
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 3
|
||||
maxTextureSize: 512
|
||||
textureSettings:
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapMode: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 185 B |
@@ -0,0 +1,52 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a056241e2722dc46a7262a8e7073fd9
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 2
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 5
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: 5
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
200
Assets/blurr.shader
Normal file
200
Assets/blurr.shader
Normal file
@@ -0,0 +1,200 @@
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "Custom/BLUR" {
|
||||
Properties{
|
||||
_Color("Main Color", Color) = (1,1,1,1)
|
||||
_BumpAmt("Distortion", Range(0,128)) = 10
|
||||
_MainTex("Tint Color (RGB)", 2D) = "white" {}
|
||||
_BumpMap("Normalmap", 2D) = "bump" {}
|
||||
_Size("Size", Range(0, 20)) = 1
|
||||
}
|
||||
|
||||
Category{
|
||||
|
||||
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Opaque" }
|
||||
|
||||
|
||||
SubShader{
|
||||
|
||||
GrabPass{
|
||||
Tags{ "LightMode" = "Always" }
|
||||
}
|
||||
Pass{
|
||||
Tags{ "LightMode" = "Always" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
float4 vertex : POSITION;
|
||||
float2 texcoord: TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 vertex : POSITION;
|
||||
float4 uvgrab : TEXCOORD0;
|
||||
};
|
||||
|
||||
v2f vert(appdata_t v) {
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
float scale = -1.0;
|
||||
#else
|
||||
float scale = 1.0;
|
||||
#endif
|
||||
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y*scale) + o.vertex.w) * 0.5;
|
||||
o.uvgrab.zw = o.vertex.zw;
|
||||
return o;
|
||||
}
|
||||
|
||||
sampler2D _GrabTexture;
|
||||
float4 _GrabTexture_TexelSize;
|
||||
float _Size;
|
||||
|
||||
half4 frag(v2f i) : COLOR{
|
||||
|
||||
half4 sum = half4(0,0,0,0);
|
||||
#define GRABPIXEL(weight,kernelx) tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(float4(i.uvgrab.x + _GrabTexture_TexelSize.x * kernelx*_Size, i.uvgrab.y, i.uvgrab.z, i.uvgrab.w))) * weight
|
||||
sum += GRABPIXEL(0.05, -4.0);
|
||||
sum += GRABPIXEL(0.09, -3.0);
|
||||
sum += GRABPIXEL(0.12, -2.0);
|
||||
sum += GRABPIXEL(0.15, -1.0);
|
||||
sum += GRABPIXEL(0.18, 0.0);
|
||||
sum += GRABPIXEL(0.15, +1.0);
|
||||
sum += GRABPIXEL(0.12, +2.0);
|
||||
sum += GRABPIXEL(0.09, +3.0);
|
||||
sum += GRABPIXEL(0.05, +4.0);
|
||||
|
||||
return sum;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
GrabPass{
|
||||
Tags{ "LightMode" = "Always" }
|
||||
}
|
||||
Pass{
|
||||
Tags{ "LightMode" = "Always" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
float4 vertex : POSITION;
|
||||
float2 texcoord: TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 vertex : POSITION;
|
||||
float4 uvgrab : TEXCOORD0;
|
||||
};
|
||||
|
||||
v2f vert(appdata_t v) {
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
float scale = -1.0;
|
||||
#else
|
||||
float scale = 1.0;
|
||||
#endif
|
||||
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y*scale) + o.vertex.w) * 0.5;
|
||||
o.uvgrab.zw = o.vertex.zw;
|
||||
return o;
|
||||
}
|
||||
|
||||
sampler2D _GrabTexture;
|
||||
float4 _GrabTexture_TexelSize;
|
||||
float _Size;
|
||||
|
||||
half4 frag(v2f i) : COLOR{
|
||||
|
||||
half4 sum = half4(0,0,0,0);
|
||||
#define GRABPIXEL(weight,kernely) tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(float4(i.uvgrab.x, i.uvgrab.y + _GrabTexture_TexelSize.y * kernely*_Size, i.uvgrab.z, i.uvgrab.w))) * weight
|
||||
|
||||
sum += GRABPIXEL(0.05, -4.0);
|
||||
sum += GRABPIXEL(0.09, -3.0);
|
||||
sum += GRABPIXEL(0.12, -2.0);
|
||||
sum += GRABPIXEL(0.15, -1.0);
|
||||
sum += GRABPIXEL(0.18, 0.0);
|
||||
sum += GRABPIXEL(0.15, +1.0);
|
||||
sum += GRABPIXEL(0.12, +2.0);
|
||||
sum += GRABPIXEL(0.09, +3.0);
|
||||
sum += GRABPIXEL(0.05, +4.0);
|
||||
|
||||
return sum;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
GrabPass{
|
||||
Tags{ "LightMode" = "Always" }
|
||||
}
|
||||
Pass{
|
||||
Tags{ "LightMode" = "Always" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
float4 vertex : POSITION;
|
||||
float2 texcoord: TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 vertex : POSITION;
|
||||
float4 uvgrab : TEXCOORD0;
|
||||
float2 uvbump : TEXCOORD1;
|
||||
float2 uvmain : TEXCOORD2;
|
||||
};
|
||||
|
||||
float _BumpAmt;
|
||||
float4 _BumpMap_ST;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
v2f vert(appdata_t v) {
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
float scale = -1.0;
|
||||
#else
|
||||
float scale = 1.0;
|
||||
#endif
|
||||
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y*scale) + o.vertex.w) * 0.5;
|
||||
o.uvgrab.zw = o.vertex.zw;
|
||||
o.uvbump = TRANSFORM_TEX(v.texcoord, _BumpMap);
|
||||
o.uvmain = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 _Color;
|
||||
sampler2D _GrabTexture;
|
||||
float4 _GrabTexture_TexelSize;
|
||||
sampler2D _BumpMap;
|
||||
sampler2D _MainTex;
|
||||
|
||||
half4 frag(v2f i) : COLOR{
|
||||
|
||||
half2 bump = UnpackNormal(tex2D(_BumpMap, i.uvbump)).rg;
|
||||
float2 offset = bump * _BumpAmt * _GrabTexture_TexelSize.xy;
|
||||
i.uvgrab.xy = offset * i.uvgrab.z + i.uvgrab.xy;
|
||||
|
||||
half4 col = tex2Dproj(_GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
|
||||
half4 tint = tex2D(_MainTex, i.uvmain) * _Color;
|
||||
|
||||
return col * tint;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Assets/blurr.shader.meta
Normal file
9
Assets/blurr.shader.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39bf7d608b193b0479edbb06cdcf26f1
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user