summaryrefslogtreecommitdiff
path: root/tools/shadertoy
diff options
context:
space:
mode:
Diffstat (limited to 'tools/shadertoy')
-rw-r--r--tools/shadertoy/template.cc10
-rw-r--r--tools/shadertoy/template.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/shadertoy/template.cc b/tools/shadertoy/template.cc
index 35c9b10..7636c0a 100644
--- a/tools/shadertoy/template.cc
+++ b/tools/shadertoy/template.cc
@@ -3,8 +3,8 @@
// TODO: Update description, rename class
#include "effects/shadertoy_effect.h"
-#include "gpu/shader_composer.h"
#include "generated/assets.h"
+#include "gpu/shader_composer.h"
// TODO: Rename class and adjust constructor parameters
ShaderToyEffect::ShaderToyEffect(const GpuContext& ctx) : Effect(ctx) {
@@ -34,8 +34,8 @@ void ShaderToyEffect::init(MainSequence* demo) {
// TODO: Update asset name to match your shader file
size_t shader_size;
- const char* shader_code = (const char*)GetAsset(
- AssetId::ASSET_SHADERTOY_SHADER, &shader_size);
+ const char* shader_code =
+ (const char*)GetAsset(AssetId::ASSET_SHADERTOY_SHADER, &shader_size);
std::string composed = ShaderComposer::Get().Compose({}, shader_code);
@@ -96,8 +96,8 @@ void ShaderToyEffect::init(MainSequence* demo) {
bind_group_ = wgpuDeviceCreateBindGroup(ctx_.device, &bg_desc);
}
-void ShaderToyEffect::render(WGPURenderPassEncoder pass, float time,
- float beat, float intensity, float aspect_ratio) {
+void ShaderToyEffect::render(WGPURenderPassEncoder pass, float time, float beat,
+ float intensity, float aspect_ratio) {
const CommonPostProcessUniforms uniforms = {
.resolution = {static_cast<float>(width_), static_cast<float>(height_)},
.aspect_ratio = aspect_ratio,
diff --git a/tools/shadertoy/template.h b/tools/shadertoy/template.h
index 82f8b39..74be9f2 100644
--- a/tools/shadertoy/template.h
+++ b/tools/shadertoy/template.h
@@ -26,7 +26,7 @@ class ShaderToyEffect : public Effect {
struct ShaderToyParams {
float param1;
float param2;
- float _pad[2]; // Padding to 16 bytes
+ float _pad[2]; // Padding to 16 bytes
};
static_assert(sizeof(ShaderToyParams) == 16,
"ShaderToyParams must be 16 bytes for WGSL alignment");