summaryrefslogtreecommitdiff
path: root/src/effects/rotating_cube_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/rotating_cube_effect.cc')
-rw-r--r--src/effects/rotating_cube_effect.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/effects/rotating_cube_effect.cc b/src/effects/rotating_cube_effect.cc
index 000d177..ec587b5 100644
--- a/src/effects/rotating_cube_effect.cc
+++ b/src/effects/rotating_cube_effect.cc
@@ -44,7 +44,8 @@ RotatingCube::RotatingCube(const GpuContext& ctx,
wgpuDeviceCreatePipelineLayout(ctx_.device, &pl_desc);
// Load shader
- const std::string composed = ShaderComposer::Get().Compose({}, rotating_cube_wgsl);
+ const std::string composed =
+ ShaderComposer::Get().Compose({}, rotating_cube_wgsl);
WGPUShaderSourceWGSL wgsl_src = {};
wgsl_src.chain.sType = WGPUSType_ShaderSourceWGSL;
wgsl_src.code = str_view(composed.c_str());
@@ -78,7 +79,7 @@ RotatingCube::RotatingCube(const GpuContext& ctx,
pipeline_desc.vertex.entryPoint = str_view("vs_main");
pipeline_desc.primitive.topology = WGPUPrimitiveTopology_TriangleList;
pipeline_desc.primitive.cullMode = WGPUCullMode_Back;
- pipeline_desc.primitive.frontFace = WGPUFrontFace_CW; // Y-flipped perspective
+ pipeline_desc.primitive.frontFace = WGPUFrontFace_CW; // Y-flipped perspective
pipeline_desc.depthStencil = &depth_stencil;
pipeline_desc.multisample.count = 1;
pipeline_desc.multisample.mask = 0xFFFFFFFF;
@@ -136,8 +137,7 @@ void RotatingCube::render(WGPUCommandEncoder encoder,
// Update uniforms
const Uniforms uniforms = Uniforms::make(
- view_proj,
- vec4(camera_pos.x, camera_pos.y, camera_pos.z, params.time),
+ view_proj, vec4(camera_pos.x, camera_pos.y, camera_pos.z, params.time),
vec4(1.0f, 0.0f, 0.0f, 0.0f), params.resolution, params.aspect_ratio);
const ObjectData obj_data = {