Skip to content

Commit 61f2adf

Browse files
committed
Fixed missing unlit material
1 parent 9d258d1 commit 61f2adf

File tree

8 files changed

+145
-5
lines changed

8 files changed

+145
-5
lines changed

movement_look_rotation/example/look_rotation.collection

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ embedded_instances {
3636
"name: \\\"{{NAME}}\\\"\\n"
3737
"materials {\\n"
3838
" name: \\\"colormap\\\"\\n"
39-
" material: \\\"/examples/material/unlit/unlit.material\\\"\\n"
39+
" material: \\\"/example/unlit.material\\\"\\n"
4040
" textures {\\n"
4141
" sampler: \\\"texture0\\\"\\n"
4242
" texture: \\\"/assets/models/kenney_prototype-kit/Textures/colormap.png\\\"\\n"
@@ -62,7 +62,7 @@ embedded_instances {
6262
"name: \\\"{{NAME}}\\\"\\n"
6363
"materials {\\n"
6464
" name: \\\"colormap\\\"\\n"
65-
" material: \\\"/examples/material/unlit/unlit.material\\\"\\n"
65+
" material: \\\"/example/unlit.material\\\"\\n"
6666
" textures {\\n"
6767
" sampler: \\\"texture0\\\"\\n"
6868
" texture: \\\"/assets/models/kenney_prototype-kit/Textures/colormap.png\\\"\\n"
@@ -98,7 +98,7 @@ embedded_instances {
9898
"name: \\\"{{NAME}}\\\"\\n"
9999
"materials {\\n"
100100
" name: \\\"colormap\\\"\\n"
101-
" material: \\\"/examples/material/unlit/unlit.material\\\"\\n"
101+
" material: \\\"/example/unlit.material\\\"\\n"
102102
" textures {\\n"
103103
" sampler: \\\"texture0\\\"\\n"
104104
" texture: \\\"/assets/models/kenney_prototype-kit/Textures/colormap.png\\\"\\n"
@@ -134,7 +134,7 @@ embedded_instances {
134134
"name: \\\"{{NAME}}\\\"\\n"
135135
"materials {\\n"
136136
" name: \\\"colormap\\\"\\n"
137-
" material: \\\"/examples/material/unlit/unlit.material\\\"\\n"
137+
" material: \\\"/example/unlit.material\\\"\\n"
138138
" textures {\\n"
139139
" sampler: \\\"texture0\\\"\\n"
140140
" texture: \\\"/assets/models/kenney_prototype-kit/Textures/colormap.png\\\"\\n"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#version 140
2+
3+
// Inputs should match the vertex shader's outputs.
4+
in vec2 var_texcoord0;
5+
6+
// The texture to sample.
7+
uniform lowp sampler2D texture0;
8+
9+
// The final color of the fragment.
10+
out lowp vec4 final_color;
11+
12+
void main()
13+
{
14+
// Sample the texture at the fragment's texture coordinates.
15+
vec4 color = texture(texture0, var_texcoord0.xy);
16+
17+
// Output the sampled color.
18+
final_color = color;
19+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "unlit"
2+
tags: "model"
3+
vertex_program: "/example/unlit.vp"
4+
fragment_program: "/example/unlit.fp"
5+
vertex_space: VERTEX_SPACE_LOCAL
6+
vertex_constants {
7+
name: "mtx_world"
8+
type: CONSTANT_TYPE_WORLD
9+
}
10+
vertex_constants {
11+
name: "mtx_view"
12+
type: CONSTANT_TYPE_VIEW
13+
}
14+
vertex_constants {
15+
name: "mtx_proj"
16+
type: CONSTANT_TYPE_PROJECTION
17+
}
18+
samplers {
19+
name: "texture0"
20+
wrap_u: WRAP_MODE_CLAMP_TO_EDGE
21+
wrap_v: WRAP_MODE_CLAMP_TO_EDGE
22+
filter_min: FILTER_MODE_MIN_LINEAR
23+
filter_mag: FILTER_MODE_MAG_LINEAR
24+
max_anisotropy: 0.0
25+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#version 140
2+
3+
// The model's vertex position and texture coordinates.
4+
in vec4 position;
5+
in vec2 texcoord0;
6+
7+
// The projection, view and world matrices.
8+
uniform general_vp
9+
{
10+
mat4 mtx_world;
11+
mat4 mtx_view;
12+
mat4 mtx_proj;
13+
};
14+
15+
// The output of a vertex shader are passed to the fragment shader.
16+
// The texture coordinates of the vertex.
17+
out vec2 var_texcoord0;
18+
19+
void main()
20+
{
21+
// Pass the texture coordinates to the fragment shader.
22+
var_texcoord0 = texcoord0;
23+
24+
// Transform the vertex position to clip space.
25+
gl_Position = mtx_proj * mtx_view * mtx_world * vec4(position.xyz, 1.0);
26+
}

render_orbit_camera/example/orbit_camera.collection

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ embedded_instances {
99
"name: \\\"{{NAME}}\\\"\\n"
1010
"materials {\\n"
1111
" name: \\\"colormap\\\"\\n"
12-
" material: \\\"/examples/material/unlit/unlit.material\\\"\\n"
12+
" material: \\\"/example/unlit.material\\\"\\n"
1313
" textures {\\n"
1414
" sampler: \\\"texture0\\\"\\n"
1515
" texture: \\\"/assets/models/kenney_prototype-kit/Textures/colormap.png\\\"\\n"

render_orbit_camera/example/unlit.fp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#version 140
2+
3+
// Inputs should match the vertex shader's outputs.
4+
in vec2 var_texcoord0;
5+
6+
// The texture to sample.
7+
uniform lowp sampler2D texture0;
8+
9+
// The final color of the fragment.
10+
out lowp vec4 final_color;
11+
12+
void main()
13+
{
14+
// Sample the texture at the fragment's texture coordinates.
15+
vec4 color = texture(texture0, var_texcoord0.xy);
16+
17+
// Output the sampled color.
18+
final_color = color;
19+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "unlit"
2+
tags: "model"
3+
vertex_program: "/example/unlit.vp"
4+
fragment_program: "/example/unlit.fp"
5+
vertex_space: VERTEX_SPACE_LOCAL
6+
vertex_constants {
7+
name: "mtx_world"
8+
type: CONSTANT_TYPE_WORLD
9+
}
10+
vertex_constants {
11+
name: "mtx_view"
12+
type: CONSTANT_TYPE_VIEW
13+
}
14+
vertex_constants {
15+
name: "mtx_proj"
16+
type: CONSTANT_TYPE_PROJECTION
17+
}
18+
samplers {
19+
name: "texture0"
20+
wrap_u: WRAP_MODE_CLAMP_TO_EDGE
21+
wrap_v: WRAP_MODE_CLAMP_TO_EDGE
22+
filter_min: FILTER_MODE_MIN_LINEAR
23+
filter_mag: FILTER_MODE_MAG_LINEAR
24+
max_anisotropy: 0.0
25+
}

render_orbit_camera/example/unlit.vp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#version 140
2+
3+
// The model's vertex position and texture coordinates.
4+
in vec4 position;
5+
in vec2 texcoord0;
6+
7+
// The projection, view and world matrices.
8+
uniform general_vp
9+
{
10+
mat4 mtx_world;
11+
mat4 mtx_view;
12+
mat4 mtx_proj;
13+
};
14+
15+
// The output of a vertex shader are passed to the fragment shader.
16+
// The texture coordinates of the vertex.
17+
out vec2 var_texcoord0;
18+
19+
void main()
20+
{
21+
// Pass the texture coordinates to the fragment shader.
22+
var_texcoord0 = texcoord0;
23+
24+
// Transform the vertex position to clip space.
25+
gl_Position = mtx_proj * mtx_view * mtx_world * vec4(position.xyz, 1.0);
26+
}

0 commit comments

Comments
 (0)