Skip to content

Commit 5422258

Browse files
committed
added tutorials
1 parent 9f3b3c4 commit 5422258

File tree

73 files changed

+5474
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+5474
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

Assets/Tutorials/checkerboard.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_PrefabParentObject: {fileID: 0}
8+
m_PrefabInternal: {fileID: 0}
9+
m_Name: checkerboard
10+
m_Shader: {fileID: 4800000, guid: 569ea8b60cff422459777fe094e72c95, type: 3}
11+
m_ShaderKeywords:
12+
m_LightmapFlags: 4
13+
m_EnableInstancingVariants: 0
14+
m_DoubleSidedGI: 0
15+
m_CustomRenderQueue: -1
16+
stringTagMap: {}
17+
disabledShaderPasses: []
18+
m_SavedProperties:
19+
serializedVersion: 3
20+
m_TexEnvs:
21+
- _BumpMap:
22+
m_Texture: {fileID: 0}
23+
m_Scale: {x: 1, y: 1}
24+
m_Offset: {x: 0, y: 0}
25+
- _DetailAlbedoMap:
26+
m_Texture: {fileID: 0}
27+
m_Scale: {x: 1, y: 1}
28+
m_Offset: {x: 0, y: 0}
29+
- _DetailMask:
30+
m_Texture: {fileID: 0}
31+
m_Scale: {x: 1, y: 1}
32+
m_Offset: {x: 0, y: 0}
33+
- _DetailNormalMap:
34+
m_Texture: {fileID: 0}
35+
m_Scale: {x: 1, y: 1}
36+
m_Offset: {x: 0, y: 0}
37+
- _EmissionMap:
38+
m_Texture: {fileID: 0}
39+
m_Scale: {x: 1, y: 1}
40+
m_Offset: {x: 0, y: 0}
41+
- _MainTex:
42+
m_Texture: {fileID: 10904, guid: 0000000000000000f000000000000000, type: 0}
43+
m_Scale: {x: 1, y: 1}
44+
m_Offset: {x: 0, y: 0}
45+
- _MetallicGlossMap:
46+
m_Texture: {fileID: 0}
47+
m_Scale: {x: 1, y: 1}
48+
m_Offset: {x: 0, y: 0}
49+
- _OcclusionMap:
50+
m_Texture: {fileID: 0}
51+
m_Scale: {x: 1, y: 1}
52+
m_Offset: {x: 0, y: 0}
53+
- _ParallaxMap:
54+
m_Texture: {fileID: 0}
55+
m_Scale: {x: 1, y: 1}
56+
m_Offset: {x: 0, y: 0}
57+
- _SubTex:
58+
m_Texture: {fileID: 2800000, guid: ce1550e070bffbe40a9be4219a5023ce, type: 3}
59+
m_Scale: {x: 1, y: 1}
60+
m_Offset: {x: 0, y: 0}
61+
m_Floats:
62+
- _BumpScale: 1
63+
- _Cutoff: 0.5
64+
- _Density: 30
65+
- _DetailNormalMapScale: 1
66+
- _DstBlend: 0
67+
- _GlossMapScale: 1
68+
- _Glossiness: 0.5
69+
- _GlossyReflections: 1
70+
- _Metallic: 0
71+
- _Mode: 0
72+
- _OcclusionStrength: 1
73+
- _Parallax: 0.02
74+
- _SmoothnessTextureChannel: 0
75+
- _SpecularHighlights: 1
76+
- _SrcBlend: 1
77+
- _UVSec: 0
78+
- _ZWrite: 1
79+
m_Colors:
80+
- _Color: {r: 1, g: 0.44117647, b: 0.44117647, a: 0.097}
81+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
82+
- _MyColor: {r: 1, g: 1, b: 1, a: 1}

Assets/Tutorials/checkerboard/checkerboard.mat.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
2+
Shader "UnityShaderTutorial/skymap_reflect_normal" {
3+
Properties
4+
{
5+
_Density ("Density", Range(2,50)) = 30
6+
}
7+
SubShader
8+
{
9+
Pass
10+
{
11+
CGPROGRAM
12+
#pragma vertex vert
13+
#pragma fragment frag
14+
#include "UnityCG.cginc"
15+
16+
struct v2f
17+
{
18+
float2 uv : TEXCOORD0;
19+
float4 vertex : SV_POSITION;
20+
};
21+
22+
float _Density;
23+
24+
v2f vert (float4 pos : POSITION, float2 uv : TEXCOORD0)
25+
{
26+
v2f o;
27+
o.vertex = UnityObjectToClipPos(pos);
28+
o.uv = uv * _Density;
29+
return o;
30+
}
31+
32+
fixed4 frag (v2f i) : SV_Target
33+
{
34+
float2 c = i.uv;
35+
c = floor(c) / 2;
36+
float checker = frac(c.x + c.y) * 2;
37+
return checker;
38+
}
39+
ENDCG
40+
}
41+
}
42+
}

Assets/Tutorials/checkerboard/checkerboard.shader.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)