Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bf71207

Browse files
author
Adam Leung
committed
Started Part 5
1 parent 001c62f commit bf71207

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

‎Assets/Shaders/Tutorial_Shader.shader

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,26 @@
99
#pragma vertex vertexFunction
1010
#pragma fragment fragmentFunction
1111

12-
voidvertexFunction () {
12+
#import "UnityCG.cginc"
1313

14+
struct appdata {
15+
float4 vertex : POSITION;
16+
float2 uv : TEXCOORD0;
17+
};
18+
19+
struct v2f {
20+
float4 position : SV_POSITION;
21+
float2 uv : TEXCOORD0;
22+
};
23+
24+
v2f vertexFunction (appdata v) {
25+
v2f OUT;
26+
27+
return OUT;
1428
}
1529

16-
void fragmentFunction (){
30+
fixed4 fragmentFunction (v2f IN) : SV_TARGET {
31+
1732
}
1833
ENDCG
1934
}

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,4 +304,4 @@ Shader "Unlit/Tutorial_Shader" {
304304
}
305305
```
306306

307-
## Part 5: Skeleton of a Unlit Shader
307+
## Part 5: Shading basics

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /