// This file is part of the 64k demo project. // It declares helper functions for post-processing effects. #pragma once #include "gpu/gpu.h" // Standard post-process bind group layout (group 0): #define PP_BINDING_SAMPLER 0 // Sampler for input texture #define PP_BINDING_TEXTURE 1 // Input texture (previous render pass) #define PP_BINDING_UNIFORMS 2 // Custom uniforms buffer // Helper to create a standard post-processing pipeline // Uniforms are accessible to both vertex and fragment shaders WGPURenderPipeline create_post_process_pipeline(WGPUDevice device, WGPUTextureFormat format, const char* shader_code); // Helper to update bind group for post-processing effects void pp_update_bind_group(WGPUDevice device, WGPURenderPipeline pipeline, WGPUBindGroup* bind_group, WGPUTextureView input_view, GpuBuffer uniforms);