summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorOmniscient <omniscient.oce@gmail.com>2024-06-18 11:03:52 +1000
committerOmniscient <omniscient.oce@gmail.com>2024-06-18 11:03:52 +1000
commitb2c9782ab2f4abec8f8548e667a8f2ad6e36bd4b (patch)
tree34973f37f585439357a5e455225d272e9398a742 /examples
parent4b5695ce26a8f821dfac987e8e11a6ba5eeff610 (diff)
wip
Diffstat (limited to 'examples')
-rw-r--r--examples/pbr_textured/ex_pbr_textured.c9
-rw-r--r--examples/primitives/ex_primitives.c4
2 files changed, 7 insertions, 6 deletions
diff --git a/examples/pbr_textured/ex_pbr_textured.c b/examples/pbr_textured/ex_pbr_textured.c
index a28d3fb..8c48b8d 100644
--- a/examples/pbr_textured/ex_pbr_textured.c
+++ b/examples/pbr_textured/ex_pbr_textured.c
@@ -41,7 +41,8 @@ int main() {
vec3 camera_front = vec3_normalise(vec3_negate(camera_pos));
camera cam = camera_create(camera_pos, camera_front, VEC3_NEG_Z, deg_to_rad(45.0));
- shader_data pbr_uniforms = { .data = NULL, .shader_data_get_layout = &pbr_textured_shader_layout };
+ shader_data pbr_uniforms = { .data = NULL,
+ .shader_data_get_layout = &pbr_textured_shader_layout };
// Make the pipeline
gpu_renderpass_desc pass_description = {};
@@ -107,9 +108,9 @@ int main() {
};
pbr_bind_data.textures = (pbr_textures){
.albedo_tex = helmet->materials->data[0].mat_data.pbr.albedo_map,
- .metal_roughness_tex = helmet->materials->data[0].mat_data.pbr.metallic_map,
- .ao_tex = helmet->materials->data[0].mat_data.pbr.ao_map,
- .normal_tex = helmet->materials->data[0].mat_data.pbr.normal_map,
+ .metal_roughness_tex = helmet->materials->data[0].mat_data.pbr.metallic_map,
+ .ao_tex = helmet->materials->data[0].mat_data.pbr.ao_map,
+ .normal_tex = helmet->materials->data[0].mat_data.pbr.normal_map,
};
pbr_uniforms.data = &pbr_bind_data;
encode_bind_shader_data(enc, 0, &pbr_uniforms);
diff --git a/examples/primitives/ex_primitives.c b/examples/primitives/ex_primitives.c
index d39c0d1..5831910 100644
--- a/examples/primitives/ex_primitives.c
+++ b/examples/primitives/ex_primitives.c
@@ -30,7 +30,7 @@ int main() {
geometry_data sphere_data = geo_create_uvsphere(1.0, 8, 8);
mesh sphere = mesh_create(&sphere_data, false);
- geometry_data plane_data = geo_create_plane(f32x2(6,4));
+ geometry_data plane_data = geo_create_plane(f32x2(6, 4));
mesh plane = mesh_create(&plane_data, false);
// FIXME: // Texture
@@ -54,7 +54,7 @@ int main() {
mat4 sphere_model = transform_to_mat(&transform);
mat4 cube_model = mat4_translation(vec3(-2., 0, 0));
- mat4 plane_model = mat4_translation(vec3(0,-2,0));
+ mat4 plane_model = mat4_translation(vec3(0, -2, 0));
draw_mesh(&cube, &cube_model, &cam);
draw_mesh(&sphere, &sphere_model, &cam);
draw_mesh(&plane, &plane_model, &cam);