| feat: replace conrod by egui + update glutin (#340) * Replace conrod by egui * More interesting UI demo * Enables egui feature for ui examples Adds the `egui` feature flag to the cargo command for running the `ui` examples. This ensures that the egui-based user interface is enabled when running the examples. * feat: update to the latest versions of nalgebra and parry * feat: update egui to 0.32, glow to 0.16, and image to 0.25 * feat: update to the latest glutin version * feat: bump bitflags, rusttype, and env_logger * chore: cargo fmt * fix warning | 10 个月前 |
| Release v0.45.0 (#396) * Release v0.45.0 * chore: update website examples list * fix 2D sprite/tilemap demos on the web | 1 个月前 |
| Release v0.45.0 (#396) * Release v0.45.0 * chore: update website examples list * fix 2D sprite/tilemap demos on the web | 1 个月前 |
| feat: add basic website with interactive demos | 7 个月前 |
| feat: update to wgpu 30.0 (#404) | 18 天前 |
| Switch to an async API (#339) * feat: auto-create the canvas element if it doesn’t exist yet when targetting wasm32 * feat: adjusts arcball camera near/far planes Modifies the near and far clipping plane distances for the arcball camera. This improves the camera's depth precision and prevents potential z-fighting issues with the default values. * Renames instancing example to 3D. Renames the instancing example to clarify that it demonstrates 3D instancing. * Adds WASM-compatible instancing examples Introduces two new examples demonstrating instancing capabilities suitable for WASM environments. One example showcases 2D instancing, while the other illustrates 3D instancing, providing practical demonstrations of rendering multiple instances of a shape with different transformations and colors. * Adds async rendering support This change introduces asynchronous rendering capabilities to support WebAssembly more effectively. It removes the `State` trait and `render_loop` methods, replacing them with async alternatives. The instancing2d and instancing3d examples are updated to use `wasm-bindgen-futures` and `pollster` for compatibility with async execution in WASM and native environments. * Introduces a proc-macro for simplified async main functions Adds a procedural macro `#[kiss3d::main]` to simplify the creation of cross-platform kiss3d applications, abstracting away platform-specific async runtime initialization for native and WASM targets. This eliminates the need for boilerplate code related to `pollster` and `wasm_bindgen_futures`, resulting in more concise and readable examples. * Re-exports async runtime dependencies Re-exports `pollster` and `wasm_bindgen_futures` to simplify async main function setup using the `kiss3d-macro` crate. This change eliminates the need for users to manually add these dependencies to their `Cargo.toml` when using the `#[kiss3d::main]` macro. The macro now uses the re-exported dependencies, ensuring compatibility and reducing boilerplate. * Refactors the examples to use async/await for rendering, making then compatible with wasm Removed the non-async variants. * Update the README to reflect the new async main pattern * Simplifies persistent point cloud example Refactors the persistent point cloud example to use the simpler `render_with` API. This removes the need for a custom `State` implementation, making the example easier to understand and maintain. * Adds IntelliJ run configurations for examples Adds IntelliJ run configurations for all kiss3d examples and common development tasks. This includes configurations for both native and WASM builds, as well as utility configurations for check, clippy, and test. The configurations are stored in the .run directory. * chore: cargo fmt * chore: clippy fix * fix cargo test | 10 个月前 |
| feat: update to wgpu 30.0 (#404) | 18 天前 |
| Release v0.45.0 (#396) * Release v0.45.0 * chore: update website examples list * fix 2D sprite/tilemap demos on the web | 1 个月前 |
| feat: add basic website with interactive demos | 7 个月前 |
| feat: add more advanced rendering effects (#386) | 3 个月前 |
| feat: more advanced rendering effects (#388) * feat: MSAA fix, raytracer denoiser, scene inspector & transparent-object shadows - Fix the MSAA implementation and add denoiser performance improvements to the GPU raytracer. - Add the kiss3d scene inspector. - Render shadows for transparent objects. * feat: PBR material model, camera exposure & HDR tonemapping/post-processing - Extend the rasterizer material model: distance fog, colored ambient light, clearcoat, anisotropy, reflectance, transmission and AlphaMode (opaque / mask / blend / premultiplied). - Add orthographic 3D projection and physical camera exposure. - Add color grading to the HDR tonemap pass and FXAA/CAS post-processing. - Gamma-correct sRGB mipmap downsampling. * feat: environment/image-based lighting, render layers, parallax mapping & SSAO - Equirectangular skybox and image-based lighting (IBL) for the rasterizer, with auto-exposure (eye adaptation). - Per-object and per-camera render-layer masks. - Parallax-occlusion mapping with method/layer-count controls. - Geometry prepass and screen-space ambient occlusion (SSAO). - egui-driven demos for the new features, plus fixes (anisotropic tangent, auto-exposure crash, parallax relief conventions). * feat: glTF loading, skeletal animation, skinning & morph targets - Load glTF/GLB models with animations and GPU skinning. - Support morph targets. * feat: clustered lighting, reflection probes, SSR & mirror reflectors - Add clustered (forward+) lighting. - Enable hardware ray tracing based on device capabilities (remove the hw_raytracer feature). - Add reflection probes and screen-space reflections (SSR). - Add reflector objects and per-object reflectors (mirrors). * feat: depth of field, WESL shader refactor, light layers & refractive transmission - Implement depth of field. - Refactor the WGSL shaders using WESL (conditional compilation) and add more timestamp queries. - Make vsync configurable at runtime; remove the force_full debug flag. - Add light layers and let objects opt out of casting shadows. - Screen-space refractive transmission that actually works. - Better mirror and material_pbr examples plus shader/CI fixes. * feat: raytracer/rasterizer parity, web compatibility & cleanup - Bring the GPU raytracer closer to parity with the rasterizer (true Lambert, matching ambient/IBL and DoF parameters, orthographic camera fix, subsurface). - Add the rt_switcher feature and enable it (and most example assets) on the web, including web-compatible skinning. - Examples, CI and cleanup: chaining in examples, antialiasing demo, remove the multi_light/tonemapping-raytracer leftovers, drop the useless MSAA sample zero, and assorted warning/CI fixes. * chore: update changelog | 2 个月前 |
| Add the authors file to give the list of contributors. | 12 年前 |
| Release v0.45.1 (#399) | 1 个月前 |
| feat: update to wgpu 30.0 (#404) | 18 天前 |
| Updated readme + add BSD-3 licence file. | 12 年前 |
| feat: switch to parry 0.26 | 7 个月前 |
| Improved 2D rendering effects (#395) * feat(2d): per-object blend modes (additive/multiply/screen/...) Add `Blend2d` (Alpha, PremultipliedAlpha, Additive, Multiply, Screen, Opaque) selectable per object via `Object2d::set_blend` / `SceneNode2d::set_blend[_recursive]`. `ObjectMaterial2d` now builds one surface pipeline per blend mode, each lazily specialized by MSAA sample count, and selects it from `data.blend()` at draw time. Wireframe/point overlays keep straight alpha blending. Adds the `blend_modes2d` example plus its run configs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(2d): sprites, sprite sheets, and 9-slice Add `SceneNode2d::sprite`/`add_sprite` (textured quad), `SpriteSheet` (regular atlas grid) with `set_sprite_frame` for flip-book animation, `set_uv_rect` to map a sprite to a texture sub-rectangle (recomputed from each vertex's normalized position so it is repeatable), and `nine_slice`/`add_nine_slice` building a 16-vertex / 9-quad mesh with a `Border` that keeps corners fixed while edges and center stretch. Adds the `sprites2d` example plus its run configs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(2d): CRT post-process + render_2d_with; bloom already applies to 2D The 2D scene renders into the HDR film, so HDR tonemapping and bloom (`Window::set_bloom_enabled`) already affect 2D content — over-bright (>1.0) colors bleed light. Add `Window::render_2d_with` to run a post-processing effect over a 2D frame, and a new `Crt` stylization effect (barrel curvature, chromatic aberration, scanlines, vignette) with per-term toggles. The CRT shader is GPU-validated in the shader-validity test. Adds the `post_processing2d` example plus its run configs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(2d): dynamic 2D lighting + normal-mapped sprites Add `LitMaterial2d`, shading 2D objects with the dynamic 2D lights from a new thread-local `Light2dManager` (ambient + up to 16 point/spot `Light2d`s, stored in a uniform array so it stays within WebGPU's bind group/storage limits). Lights sit above the plane, so a normal-mapped sprite shades per-pixel (diffuse + Blinn-Phong specular); without a normal map the surface is flat and still picks up each light's radial falloff and spot cone. New `ObjectData2d` fields `normal_map` and `lit_params` (+ accessors, `Object2d`/`SceneNode2d` setters). Helpers: `SceneNode2d::lit_sprite` /`add_lit_sprite`, `set_lit_params`, `set_normal_map_from_file`. The lit shader (point + spot lights) is GPU-validated in the shader-validity test. Adds the `lighting2d` example + run configs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(2d): tilemap rendering Add `Tilemap`: a grid of tiles drawn from a single `SpriteSheet` atlas, baked into one `SceneNode2d` mesh (one draw call, sharing the standard 2D material and blend modes). Tiles index atlas frames; `set_tile` / `fill` rebuild the dynamic mesh, and `EMPTY` cells are skipped. GPU-validated in the shader-validity test (including a dynamic rebuild). Adds the `tilemap2d` example + run configs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(2d): skeletal mesh deformation (2D GPU skinning) Add `SkinnedMesh2d`: vertices bind to up to four bones of a `Bone2d` skeleton with weights, and the vertex shader blends per-bone joint matrices (bone world × inverse bind, as 2D affine 3x3) on the GPU — Spine/DragonBones-style deformation. `update()` walks the hierarchy and uploads the joint matrices; `set_bone_local`/`set_transform` pose it. Exposes a `SceneNode2d` rendered by a dedicated skinning material. GPU-validated in the shader-validity test (built + posed + rendered). Adds the `skinning2d` example + run configs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(2d): über-shader specialization for the 2D object material Apply WESL @if conditional compilation to object2d.wgsl: a `textured` feature gates the texture binding and sample. `ObjectMaterial2d` now compiles specialized shader variants and pipelines lazily, cached by (blend mode, features, sample count), all sharing one pipeline layout (stripped bindings simply go unused). Specialization is automatic: an object still using the global default white texture gets the untextured variant (no texture sample, higher occupancy), while textured objects get the textured one — no API change. Both variants are GPU-validated in the shader-validity test (a textured object added alongside the solid ones). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(2d): screen-space 2D global illumination (Gi2d) Add `Gi2d`, a post-processing effect that ray-marches incoming light per pixel against analytic emitter/occluder discs and modulates the rendered scene by the resulting irradiance — soft shadows and colored light bleed with no light/shadow bookkeeping. Applied via `render_2d_with`; set the camera and the emitters/occluders each frame. This is the direct, brute-force form of the technique that radiance cascades accelerate (cone-traced cascade probes can layer on top later); implemented straight here for correctness and clarity. The march uses analytic sphere tracing, so no precomputed SDF/JFA texture is needed for the disc primitives. GPU-validated in the shader-validity test. Adds the `global_illumination2d` example + run configs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(post): chain multiple post-processing effects (ping-pong) Generalize post-processing from a single effect to an ordered chain, the three.js EffectComposer model: the tonemapped scene feeds the first effect, each effect's output feeds the next, and the last writes the frame. Implemented by ping-ponging between two LDR targets (`post_process_render_target` + a new `_b`); each effect reads one and writes the other. `Window::render_chain` / `render_2d_with_chain` / `render_3d_with_chain` (and `OffscreenSurface::render_chain`) take `&mut [&mut dyn PostProcessingEffect]`. The single-effect `render` / `render_2d_with` are now thin wrappers (back-compatible), and an empty chain matches the no-effect path. GPU-validated: the shader-validity test now also renders a 2-effect chain. Adds the `effect_chain2d` example (GI → CRT) + run configs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat: add support for offscreen rendering on the web * fix transparency on Firefox * feta: make it possible to specify required features for the canvas * chore: disable the "close_key" by default * chore: update changelog * chore: clippy fixes --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> | 1 个月前 |
| Fix some clippy warnings and cargo fmt | 4 年前 |