Skip to content

Commit 4e8e55b

Browse files
committed
feat: add lighting test scene
1 parent 184cd2f commit 4e8e55b

1 file changed

Lines changed: 66 additions & 5 deletions

File tree

config/app.jsonc

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"textured": {
2323
"vs": "assets/shaders/textured.vert",
2424
"fs": "assets/shaders/textured.frag"
25+
},
26+
"lit": {
27+
"vs": "assets/shaders/lit.vert",
28+
"fs": "assets/shaders/lit.frag"
2529
}
2630
},
2731
"textures": {
@@ -95,8 +99,8 @@
9599
"sampler": "default"
96100
},
97101
"monkey": {
98-
"type": "textured",
99-
"shader": "textured",
102+
"type": "lit",
103+
"shader": "lit",
100104
"pipelineState": {
101105
"faceCulling": {
102106
"enabled": false
@@ -106,8 +110,7 @@
106110
}
107111
},
108112
"tint": [1, 1, 1, 1],
109-
"texture": "monkey",
110-
"sampler": "default"
113+
"textureAlbedo": "monkey"
111114
},
112115
"moon": {
113116
"type": "textured",
@@ -128,7 +131,7 @@
128131
},
129132
"world": [
130133
{
131-
"position": [0, 1.7, 0],
134+
"position": [2, 1.7, 7],
132135
"components": [
133136
{
134137
"type": "Camera",
@@ -145,6 +148,13 @@
145148
},
146149
{
147150
"type": "Player"
151+
},
152+
{
153+
"type": "light",
154+
"lightType": "spot",
155+
"color": [1, 1, 1],
156+
"attenuation": [1.0, 0.22, 0.2],
157+
"spotAngles": [2, 5]
148158
}
149159
],
150160
"children": [
@@ -175,6 +185,57 @@
175185
"material": "grass"
176186
}
177187
]
188+
},
189+
190+
// {
191+
// "position": [-2, 0.5, -2],
192+
// "rotation": [-45, 0, 0],
193+
// "components": [
194+
// {
195+
// "type": "light",
196+
// "lightType": "spot",
197+
// "color": [0.5, 0.5, 1],
198+
// "attenuation": [1, 0.09, 0.032],
199+
// "spotAngles": [12.5, 17.5]
200+
// }
201+
// ]
202+
// },
203+
// {
204+
// "position": [-2, 2, -2],
205+
// "scale": [0.5, 0.5, 0.5],
206+
// "components": [
207+
// {
208+
// "type": "light",
209+
// "lightType": "point",
210+
// "color": [1, 0.5, 0.5]
211+
// },
212+
// {
213+
// "type": "Mesh Renderer",
214+
// "mesh": "sphere",
215+
// "material": "moon"
216+
// }
217+
// ]
218+
// },
219+
// {
220+
// "position": [-2, 0.5, -2],
221+
// "components": [
222+
// {
223+
// "type": "light",
224+
// "lightType": "directional",
225+
// "color": [0.2, 1, 0.2]
226+
// }
227+
// ]
228+
// },
229+
{
230+
"position": [2, 1, -2],
231+
"scale": [5, 5, 5],
232+
"components": [
233+
{
234+
"type": "Mesh Renderer",
235+
"mesh": "monkey",
236+
"material": "monkey"
237+
}
238+
]
178239
}
179240
]
180241
}

0 commit comments

Comments
 (0)