Posts

  • Zig comptime and C

    I’ve been using Zig a lot for the last 6 months and I have to say I really enjoy it. Two of Zigs strengths are integration with C and comptime. Thought I would share a small showcase of this.

  • Puzzle cube

    Puzzle cube

    Some time ago this fascinating cube appeared in the lunch room at the office and I’ll tell you, it’s probably one of the more frustrating puzzles I’ve encountered. You feel you have everything under control the first couple of pieces, however, towards the end you realize none of them fit and you end up like in the situation above. You were so close this time so you feel you have no other choice than to go again…

  • Voxel raycasting

    Voxels

    Voxels are great! Working in medical imaging, I encounter voxels on a daily basis. The medical images I work with are mostly volumetric data represented by voxels. Given the simplicity of voxels (think pixel, but in 3D), they are easy to work with for a lot of things. Now, one of the things I do is visualization of these images, such as rendering of a volume through raycasting. With that said, this post is not about medical visualization, the visualization I want to write about is more the kind you would see in video games.

  • Render graphs in Bevy 0.11

    Bevy 0.11 was released the other day, adding some changes related to the render graph I covered in my previous post so I thought I would just go through them. In particular there were some changes regarding render graphs that requires some updates to be compatible with Bevy 0.11.

    Read more about the update on their blog.

  • Deferred shading with compute shaders in Bevy

    Lights

    I’ve been experimenting with my ray casting voxel renderer in Bevy and one of the things I’ve been looking into is a deferred approach for lighting the scene. This post just briefly goes through some background and the steps I took to implement this in Bevy v0.10.1, and it mostly focues on the Bevy render graph. Disclaimer: Since I’ve opted for running all my rendering in compute shaders, a lot of the decisions below are due to Bevy being designed with the traditional rendering flow in mind (and rightfully so).

  • Culling of custom objects in Bevy

    I’ve been doing some experimentation with volume rendering in Bevy (v0.10.1) and I wanted to make my own representation of the actual rendered objects. I still wanted to have the regular visibility culling stage of Bevy to be performed on my volumes so here’s a brief walkthrough of how I enabled culling for my non-mesh components.

    First off, this is how a volume instance is represented in the ECS. It’s fairly similar to how meshes are setup. We have a reference to the actual volume asset, transformations, and the visibility components. As with using meshes in Bevy, I typically don’t have to care about anything else than volume and transform when actually using this bundle.

    pub struct VolumeBundle {
        pub volume: Handle<Volume>,
        pub transform: Transform,
        pub global_transform: GlobalTransform,
        pub visibility: Visibility,
        pub computed_visibility: ComputedVisibility,
    }
    

subscribe via RSS