scene: add noodle

This commit is contained in:
Zack Buhman 2026-02-25 01:35:03 +00:00
parent e5148ac4b8
commit 5f867891fa
10 changed files with 4081 additions and 9 deletions

View File

@ -23,7 +23,7 @@ collada_scene = {
-- index buffer
----------------------------------------------------------------------
local index_data = love.filesystem.newFileData("scene/test/test.idx")
local index_data = love.filesystem.newFileData("scene/noodle/noodle.idx")
index_buffer = love.graphics.newBuffer("uint32", index_data, { index = true, usage = "static" })
----------------------------------------------------------------------
@ -35,7 +35,7 @@ collada_scene = {
{ name = 'Normal', format = 'floatvec4' },
{ name = 'Texture', format = 'floatvec4' },
}
local vertex_data = love.filesystem.newFileData("scene/test/test.vtx")
local vertex_data = love.filesystem.newFileData("scene/noodle/noodle.vtx")
local shaderstorage_buffer = love.graphics.newBuffer(format, vertex_data, { shaderstorage = true, usage = "static" })
shader:send("VertexLayout", shaderstorage_buffer)
end,

View File

@ -7,20 +7,22 @@ local mat4 = _math.mat4
local vec3 = _math.vec3
local vec4 = _math.vec4
local scalar = _math.scalar
local scene_test = require 'scene.test.test'
local collada_scene = require 'collada_scene'
local collada_scene_animate = require 'collada_scene.animate'
local collada_scene_node_state = require 'collada_scene.node_state'
local scene_test = require 'scene.test.test'
local scene_noodle = require 'scene.noodle.noodle'
local node_state
function love.load(args)
love.window.setMode(1024, 1024, {depth=true})
collada_scene.load_buffers()
collada_scene.load_images("scene/test", scene_test.descriptor.images)
collada_scene.load_images("scene/noodle", scene_noodle.descriptor.images)
node_state = collada_scene_node_state(scene_test.descriptor.nodes)
node_state = collada_scene_node_state(scene_noodle.descriptor.nodes)
end
local rotation = 0.0
@ -33,13 +35,13 @@ function love.draw()
width, height = love.graphics.getDimensions()
local aspect_ratio = width / height
local projection = mat4.perspective_fov_rh(scalar.convert_to_radians(45 / 2),
local projection = mat4.perspective_fov_rh(scalar.convert_to_radians(45),
aspect_ratio,
0.1,
1000.0)
local view = mat4.look_at_rh(vec3(-88.57101, -71.71298, 104.5738),
vec3(-19.90239, -27.72767, 54.6898),
local view = mat4.look_at_rh(vec3(-54.43401, -35.53392, 57.3912),
vec3(0.0, 0.0, 13.41141),
vec3(0, 0, 1))
local world1 = mat4.rotation_x(rotation)
@ -48,7 +50,7 @@ function love.draw()
local transform = view * projection
collada_scene_animate.update(t, node_state)
--collada_scene_animate.update(t, node_state)
t = t + 0.016
love.graphics.setDepthMode("less", true)

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

1747
scene/noodle/noodle.DAE Normal file

File diff suppressed because one or more lines are too long

BIN
scene/noodle/noodle.idx Normal file

Binary file not shown.

2312
scene/noodle/noodle.lua Normal file

File diff suppressed because it is too large Load Diff

6
scene/noodle/noodle.mk Normal file
View File

@ -0,0 +1,6 @@
IMAGES += image/0_logOnly.DDS
image/0_logOnly.DDS: ./images/0_logOnly.png
@mkdir -p image
texconv10.exe -f BC1_UNORM -nologo "$<"
mv "$(<:.png=.DDS)" "$@"

5
scene/noodle/noodle.rc Normal file
View File

@ -0,0 +1,5 @@
RES_SCENES_NOODLE_VTX RCDATA "noodle.vtx"
RES_SCENES_NOODLE_VJW RCDATA "noodle.vjw"
RES_SCENES_NOODLE_IDX RCDATA "noodle.idx"
_0_LOGONLY_PNG RCDATA "image/0_logOnly.DDS"

0
scene/noodle/noodle.vjw Normal file
View File

BIN
scene/noodle/noodle.vtx Normal file

Binary file not shown.