Skip to content

Commit ab83fca

Browse files
committed
update asset
1 parent 7d90126 commit ab83fca

File tree

390 files changed

+8
-6
lines changed

Some content is hidden

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

390 files changed

+8
-6
lines changed

37-gpudrivenrendering.lua

+8-6
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ local function renderMainPass()
185185
bgfx.set_state()
186186

187187
-- Set "material" data (currently a colour only)
188-
bgfx.set_uniform(ctx.u_colour, table.unpack(ctx.m_materials))
188+
bgfx.set_uniform(ctx.u_color, table.unpack(ctx.m_materials))
189189

190190
-- Set vertex and index buffer.
191191
bgfx.set_vertex_buffer(0, ctx.m_allPropsVertexbufferHandle)
@@ -232,7 +232,8 @@ function ctx.init(w,h)
232232
-- create uniforms
233233
ctx.u_inputRTSize = bgfx.create_uniform("u_inputRTSize", "v4")
234234
ctx.u_cullingConfig = bgfx.create_uniform("u_cullingConfig", "v4")
235-
ctx.u_colour = bgfx.create_uniform("u_colour", "v4")
235+
ctx.u_color = bgfx.create_uniform("u_color", "v4", 32)
236+
ctx.s_texOcclusionDepth = bgfx.create_uniform("s_texOcclusionDepth", "s")
236237

237238
-- create props
238239
ctx.m_totalInstancesCount = 0
@@ -255,11 +256,11 @@ function ctx.init(w,h)
255256
prop.m_indexbufferHandle = bgfx.create_index_buffer(prop.m_indices)
256257
end
257258

259+
local temp1 = ms:vector(-0.5, -0.5, -0.5, 1.0)
260+
local temp2 = ms:vector(0.5, 0.5, 0.5, 1.0)
258261
local function minmax(inst)
259-
local temp = ms:vector(-0.5, -0.5, -0.5, 1.0)
260-
inst.m_bboxMin = ms:ref "vector" ( ms(inst.m_world, temp, "*P") )
261-
local temp = ms:vector(0.5, 0.5, 0.5, 1.0)
262-
inst.m_bboxMax = ms:ref "vector" ( ms(inst.m_world, temp, "*P") )
262+
inst.m_bboxMin = ms:ref "vector" ( ms(inst.m_world, temp1, "*P") )
263+
inst.m_bboxMax = ms:ref "vector" ( ms(inst.m_world, temp2, "*P") )
263264
end
264265

265266
-- add a ground plane
@@ -453,6 +454,7 @@ function ctx.init(w,h)
453454

454455
-- Create programs from shaders for occlusion pass.
455456
ctx.m_programOcclusionPass = util.programLoad "vs_gdr_render_occlusion"
457+
ctx.m_programCopyZ = util.programLoad "cs_gdr_copy_z"
456458
ctx.m_programDownscaleHiZ = util.computeLoad "cs_gdr_downscale_hi_z"
457459
ctx.m_programOccludeProps = util.computeLoad "cs_gdr_occlude_props"
458460
ctx.m_programStreamCompaction = util.computeLoad "cs_gdr_stream_compaction"

meshes/bunny.bin

0 Bytes
Binary file not shown.

meshes/bunny_decimated.bin

0 Bytes
Binary file not shown.

meshes/bunny_patched.bin

0 Bytes
Binary file not shown.

meshes/column.bin

0 Bytes
Binary file not shown.

meshes/cube.bin

0 Bytes
Binary file not shown.

meshes/hollowcube.bin

0 Bytes
Binary file not shown.

meshes/orb.bin

0 Bytes
Binary file not shown.

meshes/platform.bin

0 Bytes
Binary file not shown.

meshes/test_scene.bin

0 Bytes
Binary file not shown.

meshes/tree.bin

0 Bytes
Binary file not shown.

meshes/tree1b_lod0_1.bin

0 Bytes
Binary file not shown.

meshes/tree1b_lod0_2.bin

0 Bytes
Binary file not shown.

meshes/tree1b_lod1_1.bin

0 Bytes
Binary file not shown.

meshes/tree1b_lod1_2.bin

0 Bytes
Binary file not shown.

meshes/tree1b_lod2_1.bin

0 Bytes
Binary file not shown.

meshes/tree1b_lod2_2.bin

0 Bytes
Binary file not shown.

shaders/dx11/cs_assao_apply.bin

2.1 KB
Binary file not shown.
Binary file not shown.

shaders/dx11/cs_assao_generate_q0.bin

3.44 KB
Binary file not shown.

shaders/dx11/cs_assao_generate_q1.bin

5.85 KB
Binary file not shown.

shaders/dx11/cs_assao_generate_q2.bin

7.11 KB
Binary file not shown.

shaders/dx11/cs_assao_generate_q3.bin

7.84 KB
Binary file not shown.
3.68 KB
Binary file not shown.
206 Bytes
Binary file not shown.
956 Bytes
Binary file not shown.
1.2 KB
Binary file not shown.
764 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
3.22 KB
Binary file not shown.
1.19 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
789 Bytes
Binary file not shown.

shaders/dx11/cs_assao_smart_blur.bin

1.36 KB
Binary file not shown.
2.05 KB
Binary file not shown.

shaders/dx11/cs_gdr_copy_z.bin

422 Bytes
Binary file not shown.
-132 Bytes
Binary file not shown.

shaders/dx11/cs_gdr_occlude_props.bin

4 Bytes
Binary file not shown.
4 Bytes
Binary file not shown.

shaders/dx11/fs_albedo_output.bin

492 Bytes
Binary file not shown.
968 Bytes
Binary file not shown.

shaders/dx11/fs_assao_gbuffer.bin

445 Bytes
Binary file not shown.

shaders/dx11/fs_bloom_combine.bin

539 Bytes
Binary file not shown.

shaders/dx11/fs_bump.bin

-160 Bytes
Binary file not shown.
314 Bytes
Binary file not shown.

shaders/dx11/fs_deferred_combine.bin

24 Bytes
Binary file not shown.

shaders/dx11/fs_deferred_debug.bin

16 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.

shaders/dx11/fs_deferred_geom.bin

24 Bytes
Binary file not shown.

shaders/dx11/fs_deferred_light.bin

24 Bytes
Binary file not shown.

shaders/dx11/fs_deferred_light_ta.bin

1.41 KB
Binary file not shown.
1.49 KB
Binary file not shown.

shaders/dx11/fs_downsample.bin

1.85 KB
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

shaders/dx11/fs_upsample.bin

1.41 KB
Binary file not shown.

shaders/dx11/fs_vt_mip.bin

922 Bytes
Binary file not shown.

shaders/dx11/fs_vt_unlit.bin

1.18 KB
Binary file not shown.

shaders/dx11/fs_wf_wireframe.bin

0 Bytes
Binary file not shown.

shaders/dx11/vs_albedo_output.bin

1.08 KB
Binary file not shown.

shaders/dx11/vs_assao.bin

524 Bytes
Binary file not shown.

shaders/dx11/vs_assao_gbuffer.bin

952 Bytes
Binary file not shown.

shaders/dx11/vs_bump.bin

-224 Bytes
Binary file not shown.

shaders/dx11/vs_bump_instanced.bin

-376 Bytes
Binary file not shown.

shaders/dx11/vs_deferred_combine.bin

8 Bytes
Binary file not shown.

shaders/dx11/vs_deferred_debug.bin

8 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.

shaders/dx11/vs_deferred_geom.bin

8 Bytes
Binary file not shown.

shaders/dx11/vs_deferred_light.bin

8 Bytes
Binary file not shown.

shaders/dx11/vs_fullscreen.bin

520 Bytes
Binary file not shown.
Binary file not shown.
4 Bytes
Binary file not shown.

shaders/dx11/vs_vt_generic.bin

677 Bytes
Binary file not shown.

shaders/dx9/fs_albedo_output.bin

189 Bytes
Binary file not shown.

shaders/dx9/fs_bloom_combine.bin

436 Bytes
Binary file not shown.

shaders/dx9/fs_bump.bin

0 Bytes
Binary file not shown.

shaders/dx9/fs_downsample.bin

965 Bytes
Binary file not shown.
-20 Bytes
Binary file not shown.
-20 Bytes
Binary file not shown.
-20 Bytes
Binary file not shown.
-20 Bytes
Binary file not shown.
-20 Bytes
Binary file not shown.
-20 Bytes
Binary file not shown.

shaders/dx9/fs_upsample.bin

791 Bytes
Binary file not shown.

shaders/dx9/fs_vt_mip.bin

663 Bytes
Binary file not shown.

shaders/dx9/fs_vt_unlit.bin

942 Bytes
Binary file not shown.

shaders/dx9/fs_wf_wireframe.bin

-44 Bytes
Binary file not shown.

shaders/dx9/vs_albedo_output.bin

578 Bytes
Binary file not shown.

shaders/dx9/vs_bump.bin

-116 Bytes
Binary file not shown.

shaders/dx9/vs_bump_instanced.bin

-140 Bytes
Binary file not shown.

shaders/dx9/vs_fullscreen.bin

313 Bytes
Binary file not shown.

shaders/dx9/vs_vt_generic.bin

438 Bytes
Binary file not shown.

shaders/essl/fs_albedo_output.bin

131 Bytes
Binary file not shown.

shaders/essl/fs_bloom_combine.bin

378 Bytes
Binary file not shown.

shaders/essl/fs_bump.bin

-32 Bytes
Binary file not shown.

shaders/essl/fs_downsample.bin

1.95 KB
Binary file not shown.

shaders/essl/fs_upsample.bin

1.56 KB
Binary file not shown.

shaders/essl/fs_vt_mip.bin

820 Bytes
Binary file not shown.

shaders/essl/fs_vt_unlit.bin

1.16 KB
Binary file not shown.

shaders/essl/vs_albedo_output.bin

451 Bytes
Binary file not shown.

shaders/essl/vs_bump.bin

-269 Bytes
Binary file not shown.

shaders/essl/vs_bump_instanced.bin

-135 Bytes
Binary file not shown.

shaders/essl/vs_fullscreen.bin

337 Bytes
Binary file not shown.

shaders/essl/vs_vt_generic.bin

455 Bytes
Binary file not shown.

shaders/glsl/cs_assao_apply.bin

3.35 KB
Binary file not shown.
Binary file not shown.

shaders/glsl/cs_assao_generate_q0.bin

14.9 KB
Binary file not shown.

shaders/glsl/cs_assao_generate_q1.bin

14.9 KB
Binary file not shown.

shaders/glsl/cs_assao_generate_q2.bin

14.9 KB
Binary file not shown.

shaders/glsl/cs_assao_generate_q3.bin

14.9 KB
Binary file not shown.
14.9 KB
Binary file not shown.
1.5 KB
Binary file not shown.
2.01 KB
Binary file not shown.
2.33 KB
Binary file not shown.
1.87 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
4.81 KB
Binary file not shown.
2.59 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
2.19 KB
Binary file not shown.

shaders/glsl/cs_assao_smart_blur.bin

3.17 KB
Binary file not shown.
3.34 KB
Binary file not shown.

shaders/glsl/cs_gdr_copy_z.bin

1.71 KB
Binary file not shown.
93 Bytes
Binary file not shown.

shaders/glsl/cs_gdr_occlude_props.bin

287 Bytes
Binary file not shown.
204 Bytes
Binary file not shown.

shaders/glsl/fs_albedo_output.bin

125 Bytes
Binary file not shown.
949 Bytes
Binary file not shown.

shaders/glsl/fs_assao_gbuffer.bin

242 Bytes
Binary file not shown.

shaders/glsl/fs_bloom_combine.bin

367 Bytes
Binary file not shown.

shaders/glsl/fs_bump.bin

-32 Bytes
Binary file not shown.
10.4 KB
Binary file not shown.

shaders/glsl/fs_deferred_combine.bin

4 Bytes
Binary file not shown.

shaders/glsl/fs_deferred_debug.bin

4 Bytes
Binary file not shown.
4 Bytes
Binary file not shown.

shaders/glsl/fs_deferred_geom.bin

4 Bytes
Binary file not shown.

shaders/glsl/fs_deferred_light.bin

28 Bytes
Binary file not shown.

shaders/glsl/fs_deferred_light_ta.bin

1.79 KB
Binary file not shown.
11.1 KB
Binary file not shown.

shaders/glsl/fs_downsample.bin

1.86 KB
Binary file not shown.
Binary file not shown.

shaders/glsl/fs_upsample.bin

1.47 KB
Binary file not shown.

shaders/glsl/fs_vt_mip.bin

764 Bytes
Binary file not shown.

shaders/glsl/fs_vt_unlit.bin

1.02 KB
Binary file not shown.

shaders/glsl/vs_albedo_output.bin

415 Bytes
Binary file not shown.

shaders/glsl/vs_assao.bin

315 Bytes
Binary file not shown.

shaders/glsl/vs_assao_gbuffer.bin

570 Bytes
Binary file not shown.

shaders/glsl/vs_bump.bin

-245 Bytes
Binary file not shown.

shaders/glsl/vs_bump_instanced.bin

-129 Bytes
Binary file not shown.

shaders/glsl/vs_deferred_combine.bin

4 Bytes
Binary file not shown.

shaders/glsl/vs_deferred_debug.bin

4 Bytes
Binary file not shown.
4 Bytes
Binary file not shown.

shaders/glsl/vs_deferred_geom.bin

4 Bytes
Binary file not shown.

shaders/glsl/vs_deferred_light.bin

4 Bytes
Binary file not shown.

shaders/glsl/vs_fullscreen.bin

307 Bytes
Binary file not shown.
Binary file not shown.
4 Bytes
Binary file not shown.

shaders/glsl/vs_vt_generic.bin

419 Bytes
Binary file not shown.

shaders/metal/cs_assao_apply.bin

3.07 KB
Binary file not shown.
Binary file not shown.
8.73 KB
Binary file not shown.
11.2 KB
Binary file not shown.
12.9 KB
Binary file not shown.
14.1 KB
Binary file not shown.
8.82 KB
Binary file not shown.
289 Bytes
Binary file not shown.
1.25 KB
Binary file not shown.
2.05 KB
Binary file not shown.
1.01 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
3.25 KB
Binary file not shown.
1.62 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.15 KB
Binary file not shown.

shaders/metal/cs_assao_smart_blur.bin

2.24 KB
Binary file not shown.
3.17 KB
Binary file not shown.

shaders/metal/cs_gdr_copy_z.bin

689 Bytes
Binary file not shown.
1.12 KB
Binary file not shown.
4.01 KB
Binary file not shown.
4.07 KB
Binary file not shown.

shaders/metal/cs_indirect.bin

585 Bytes
Binary file not shown.

shaders/metal/cs_init_instances.bin

8.14 KB
Binary file not shown.

shaders/metal/cs_update.bin

816 Bytes
Binary file not shown.

shaders/metal/cs_update_instances.bin

2.3 KB
Binary file not shown.

shaders/metal/fs_albedo_output.bin

468 Bytes
Binary file not shown.
1.53 KB
Binary file not shown.

shaders/metal/fs_assao_gbuffer.bin

711 Bytes
Binary file not shown.

shaders/metal/fs_bloom_combine.bin

738 Bytes
Binary file not shown.

shaders/metal/fs_bump.bin

-2.68 KB
Binary file not shown.

shaders/metal/fs_callback.bin

-189 Bytes
Binary file not shown.

shaders/metal/fs_cubes.bin

-18 Bytes
Binary file not shown.

shaders/metal/fs_deferred_combine.bin

-288 Bytes
Binary file not shown.

shaders/metal/fs_deferred_debug.bin

-35 Bytes
Binary file not shown.
-18 Bytes
Binary file not shown.

shaders/metal/fs_deferred_geom.bin

-173 Bytes
Binary file not shown.

shaders/metal/fs_deferred_light.bin

-900 Bytes
Binary file not shown.
1.5 KB
Binary file not shown.

shaders/metal/fs_downsample.bin

1.7 KB
Binary file not shown.
Binary file not shown.

shaders/metal/fs_hdr_blur.bin

-109 Bytes
Binary file not shown.

shaders/metal/fs_hdr_bright.bin

-668 Bytes
Binary file not shown.

shaders/metal/fs_hdr_lum.bin

-88 Bytes
Binary file not shown.

shaders/metal/fs_hdr_lumavg.bin

-1.17 KB
Binary file not shown.

shaders/metal/fs_hdr_mesh.bin

-138 Bytes
Binary file not shown.

shaders/metal/fs_hdr_skybox.bin

-51 Bytes
Binary file not shown.

shaders/metal/fs_hdr_tonemap.bin

143 Bytes
Binary file not shown.

shaders/metal/fs_ibl_mesh.bin

-261 Bytes
Binary file not shown.

shaders/metal/fs_ibl_skybox.bin

70 Bytes
Binary file not shown.

shaders/metal/fs_instancing.bin

-18 Bytes
Binary file not shown.

shaders/metal/fs_mesh.bin

91 Bytes
Binary file not shown.

shaders/metal/fs_oit.bin

-29 Bytes
Binary file not shown.

shaders/metal/fs_oit_wb.bin

114 Bytes
Binary file not shown.

shaders/metal/fs_oit_wb_blit.bin

-96 Bytes
Binary file not shown.

shaders/metal/fs_oit_wb_separate.bin

-11 Bytes
Binary file not shown.
-96 Bytes
Binary file not shown.

shaders/metal/fs_particle.bin

80 Bytes
Binary file not shown.

shaders/metal/fs_picking_id.bin

50 Bytes
Binary file not shown.

shaders/metal/fs_picking_shaded.bin

-110 Bytes
Binary file not shown.

shaders/metal/fs_pom.bin

630 Bytes
Binary file not shown.

shaders/metal/fs_raymarching.bin

-5.98 KB
Binary file not shown.

shaders/metal/fs_rsm_combine.bin

-3.73 KB
Binary file not shown.

shaders/metal/fs_rsm_gbuffer.bin

115 Bytes
Binary file not shown.

shaders/metal/fs_rsm_lbuffer.bin

-183 Bytes
Binary file not shown.

shaders/metal/fs_rsm_shadow.bin

186 Bytes
Binary file not shown.
-105 Bytes
Binary file not shown.
-716 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-647 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-845 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-90 Bytes
Binary file not shown.

shaders/metal/fs_shadowmaps_hblur.bin

-12 Bytes
Binary file not shown.
-702 Bytes
Binary file not shown.
-63 Bytes
Binary file not shown.
-51 Bytes
Binary file not shown.
-171 Bytes
Binary file not shown.
-143 Bytes
Binary file not shown.
-35 Bytes
Binary file not shown.
-10 Bytes
Binary file not shown.
-25 Bytes
Binary file not shown.

shaders/metal/fs_shadowmaps_vblur.bin

-12 Bytes
Binary file not shown.
-702 Bytes
Binary file not shown.
-301 Bytes
Binary file not shown.
-90 Bytes
Binary file not shown.
-190 Bytes
Binary file not shown.
70 Bytes
Binary file not shown.
39 Bytes
Binary file not shown.
39 Bytes
Binary file not shown.
-92 Bytes
Binary file not shown.
70 Bytes
Binary file not shown.
41 Bytes
Binary file not shown.
41 Bytes
Binary file not shown.
107 Bytes
Binary file not shown.
-105 Bytes
Binary file not shown.
70 Bytes
Binary file not shown.
237 Bytes
Binary file not shown.
-35 Bytes
Binary file not shown.
-372 Bytes
Binary file not shown.

shaders/metal/fs_sky.bin

-110 Bytes
Binary file not shown.
40 Bytes
Binary file not shown.

shaders/metal/fs_sky_landscape.bin

264 Bytes
Binary file not shown.

shaders/metal/fs_sms_mesh.bin

-3.89 KB
Binary file not shown.

shaders/metal/fs_sms_mesh_pd.bin

-3.18 KB
Binary file not shown.

shaders/metal/fs_sms_shadow.bin

-190 Bytes
Binary file not shown.

shaders/metal/fs_sms_shadow_pd.bin

0 Bytes
Binary file not shown.
-105 Bytes
Binary file not shown.
-431 Bytes
Binary file not shown.
-90 Bytes
Binary file not shown.

shaders/metal/fs_stencil_texture.bin

-35 Bytes
Binary file not shown.
-500 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)