Skip to content

Commit 9a781f1

Browse files
author
GBDixonAlex
committed
- merge and resolve conflicts with devx
2 parents b87979e + b011e28 commit 9a781f1

File tree

14 files changed

+123
-124
lines changed

14 files changed

+123
-124
lines changed

config.jsn

+3-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@
7676

7777
// default imgui layouts form the client.. todo. move to target
7878
["plugins/imgui.ini", "target/debug/imgui.ini"]
79-
["plugins/imgui.ini", "target/debug/imgui.ini"]
8079
["plugins/imgui.ini", "target/debug/deps/imgui.ini"]
8180

81+
["plugins/imgui.ini", "target/release/imgui.ini"]
82+
["plugins/imgui.ini", "target/release/deps/imgui.ini"]
83+
8284
// default user config for the client
8385
["plugins/user_config.json", "target/user_config.json"]
8486

@@ -118,7 +120,6 @@
118120
"-o ${data_dir}/shaders"
119121
"-t ${temp_dir}/shaders"
120122
"-num_threads 1"
121-
"-f"
122123
"-args"
123124
"-Zpr"
124125
]

examples/raytraced_triangle/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ fn main() -> Result<(), hotline_rs::Error> {
117117
index_format: gfx::Format::R16u,
118118
vertex_count: 3,
119119
vertex_format: gfx::Format::RGB32f,
120+
vertex_stride: 12
120121
}),
121122
geometry_flags: gfx::RaytracingGeometryFlags::OPAQUE,
122123
build_flags: AccelerationStructureBuildFlags::PREFER_FAST_TRACE

plugins/ecs/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use hotline_rs::prelude::*;
66
use maths_rs::prelude::*;
77

88
use bevy_ecs::prelude::*;
9-
use bevy_ecs::schedule::SystemConfig;
109
use bevy_ecs::schedule::SystemConfigs;
1110

1211
use std::collections::HashMap;

plugins/ecs_examples/src/dynamic_cubemap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub fn setup_dynamic_cubemap(
6363
let dist = rand::distributions::Uniform::from(0..orbit_meshes.len());
6464

6565
let num_primitves = 32;
66-
for i in 0..num_primitves {
66+
for _ in 0..num_primitves {
6767
let rv = normalize(vec3f(rng.gen(), rng.gen(), rng.gen()) * 2.0 - 1.0);
6868
let rr = vec3f(rng.gen(), rng.gen(), rng.gen()) * f32::tau();
6969
let offset : f32 = 20.0 + rng.gen::<f32>() * 20.0;

plugins/ecs_examples/src/generate_mip_maps.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,15 @@ pub fn setup_generate_mip_maps(
2828

2929
let sphere_mesh = hotline_rs::primitives::create_sphere_mesh(&mut device.0, 32);
3030
let dim = 64;
31-
let dim2 = dim / 2;
3231
let sphere_size = 5.0;
3332

34-
let half_extent = dim2 as f32 * sphere_size;
35-
3633
let mut angle = 0.0;
3734
let mut offset = 0.0;
3835

3936
let step = f32::tau() / dim as f32;
4037

41-
for y in 0..dim {
42-
for x in 0..dim {
38+
for _ in 0..dim {
39+
for _ in 0..dim {
4340

4441
let wave_x = f32::sin(angle) * (sphere_size + offset);
4542
let wave_y = f32::cos(angle) * (sphere_size + offset);

plugins/ecs_examples/src/gpu_frustum_culling.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::prelude::*;
77
/// GPU Frustum Culling
88
///
99
10+
#[allow(unused)]
1011
#[repr(packed)]
1112
pub struct DrawIndirectArgs {
1213
pub vertex_buffer: gfx::VertexBufferView,

plugins/ecs_examples/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ mod shadow_map;
2929
mod omni_shadow_map;
3030
mod dynamic_cubemap;
3131
mod pbr;
32+
mod raytraced_shadows;
3233

3334
use prelude::*;
3435

@@ -583,7 +584,8 @@ pub fn get_demos_ecs_examples() -> Vec<String> {
583584
"shadow_map",
584585
"dynamic_cubemap",
585586
"omni_shadow_map",
586-
"pbr"
587+
"pbr",
588+
"raytraced_shadows"
587589
]
588590
}
589591

plugins/ecs_examples/src/omni_shadow_map.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ pub fn animate_omni_shadow (
165165

166166
let extent = 60.0;
167167

168-
for (mut position, mut velocity, component) in &mut light_query {
168+
for (mut position, _, component) in &mut light_query {
169169

170170
position.0 = vec3f(sin(time.accumulated), cos(time.accumulated), cos(time.accumulated)) * extent;
171171

@@ -179,10 +179,9 @@ pub fn animate_omni_shadow (
179179
#[export_update_fn]
180180
pub fn animate_meshes (
181181
time: Res<TimeRes>,
182-
mut pmfx: ResMut<PmfxRes>,
183182
mut mesh_query: Query<(&mut Rotation, &MeshComponent), Without<Billboard>>) -> Result<(), hotline_rs::Error> {
184183

185-
for (mut rotation, component) in &mut mesh_query {
184+
for (mut rotation, _) in &mut mesh_query {
186185
rotation.0 *= Quat::from_euler_angles(f32::pi() * time.delta, f32::pi() * time.delta, f32::pi() * time.delta);
187186
}
188187

plugins/ecs_examples/src/shadow_map.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ pub fn setup_shadow_map(
8383
let hex_mesh = hotline_rs::primitives::create_prism_mesh(&mut device.0, 6, false, true, 1.0, 1.0);
8484

8585
let dim = 128;
86-
let dim2 = dim / 2;
8786
let tile_size = 5.0;
8887

8988
let half_extent = dim as f32 * tile_size;
@@ -139,9 +138,9 @@ pub fn setup_shadow_map(
139138

140139
let dist = rand::distributions::Uniform::from(tile_size..tile_size * 10.0);
141140

142-
for y in 0..dim {
141+
for _ in 0..dim {
143142
pos.x = start.x;
144-
for x in 0..dim {
143+
for _ in 0..dim {
145144

146145
let h = dist.sample(&mut rng) as f32;
147146

plugins/export_macros/src/lib.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,27 @@ pub fn export_update_fn(attr: TokenStream, item: TokenStream) -> TokenStream {
124124
let parsed = parse_fn(&item);
125125
// emit code to move function args into closure and pass them to function
126126
let (moves, pass) = emit_moves_and_pass_args(&parsed, &Vec::new());
127-
128127
let order = emit_update_order(attr, "SystemSets :: Update");
129-
130-
// emit the closure code itself
128+
129+
// create wrapper
131130
let export_fn = format!("#[no_mangle] fn export_{}() -> SystemConfigs {{
132131
(move | {} | {{
133132
{} ({}).unwrap();
134133
}}).into_configs().{}
135134
}}", parsed.name, moves, parsed.name, pass, order);
135+
let export_tokens : TokenStream = export_fn.parse().unwrap();
136136

137137
let input = parse_macro_input!(item as ItemFn);
138138
let expanded = quote! {
139139
#input
140140
};
141141

142142
let export_tokens : TokenStream = export_fn.parse().unwrap();
143+
let expanded = quote! {
144+
// The original function remains untouched
145+
#input
146+
};
147+
143148
let mut output = TokenStream::from(expanded);
144149
output.extend(export_tokens);
145150
output

plugins/imgui.ini

+30-36
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,47 @@
1-
[Window][pmfx]
2-
Pos=710,1043
3-
Size=568,293
4-
Collapsed=0
5-
DockId=0x00000005,0
6-
7-
[Window][ecs]
8-
Pos=0,1043
9-
Size=708,293
10-
Collapsed=0
11-
DockId=0x00000001,0
12-
13-
[Window][textures]
14-
Pos=710,1043
15-
Size=568,293
16-
Collapsed=0
17-
DockId=0x00000005,1
18-
191
[Window][main_window_dockspace]
202
Pos=0,0
21-
Size=1278,1336
3+
Size=1485,1307
224
Collapsed=0
235

24-
[Window][main_viewport]
25-
Pos=0,22
26-
Size=1278,950
6+
[Window][Debug##Default]
7+
Pos=60,60
8+
Size=400,400
279
Collapsed=0
28-
DockId=0x00000004,0
2910

3011
[Window][main_dock]
3112
Pos=0,22
32-
Size=1278,1019
13+
Size=1485,804
3314
Collapsed=0
34-
DockId=0x00000004
15+
DockId=0x00000001
3516

36-
[Window][Debug##Default]
37-
Pos=60,60
38-
Size=400,400
17+
[Window][textures]
18+
Pos=806,828
19+
Size=679,479
20+
Collapsed=0
21+
DockId=0x00000004,0
22+
23+
[Window][pmfx]
24+
Pos=806,828
25+
Size=679,479
3926
Collapsed=0
27+
DockId=0x00000004,1
4028

4129
[Window][perf]
42-
Pos=710,1043
43-
Size=568,293
30+
Pos=806,828
31+
Size=679,479
32+
Collapsed=0
33+
DockId=0x00000004,2
34+
35+
[Window][ecs]
36+
Pos=0,828
37+
Size=804,479
4438
Collapsed=0
45-
DockId=0x00000005,2
39+
DockId=0x00000003,0
4640

4741
[Docking][Data]
48-
DockSpace ID=0x7E079D5E Window=0x62451DFA Pos=1281,53 Size=1278,1314 Split=Y Selected=0xA2888183
49-
DockNode ID=0x00000004 Parent=0x7E079D5E SizeRef=1278,1019 CentralNode=1 Selected=0xA2888183
50-
DockNode ID=0x00000002 Parent=0x7E079D5E SizeRef=1278,293 Split=X Selected=0xBDBFA952
51-
DockNode ID=0x00000001 Parent=0x00000002 SizeRef=708,290 Selected=0x3681C83B
52-
DockNode ID=0x00000005 Parent=0x00000002 SizeRef=568,290 Selected=0xBDBFA952
42+
DockSpace ID=0x7E079D5E Window=0x62451DFA Pos=25,110 Size=1485,1285 Split=Y Selected=0xA2888183
43+
DockNode ID=0x00000001 Parent=0x7E079D5E SizeRef=1969,1399 CentralNode=1 Selected=0xA2888183
44+
DockNode ID=0x00000002 Parent=0x7E079D5E SizeRef=1969,479 Split=X Selected=0x3681C83B
45+
DockNode ID=0x00000003 Parent=0x00000002 SizeRef=1066,369 Selected=0x3681C83B
46+
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=901,369 Selected=0xBDBFA952
5347

0 commit comments

Comments
 (0)