GithubHelp home page GithubHelp logo

ria8651 / bevy-voxel-engine Goto Github PK

View Code? Open in Web Editor NEW
50.0 3.0 3.0 22.21 MB

A voxel renderer for the bevy game engine

License: Apache License 2.0

Rust 62.44% WGSL 37.56%
bevy rust voxels wgpu

bevy-voxel-engine's People

Contributors

nerdachse avatar ria8651 avatar sebmenozzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

thedodd nerdachse

bevy-voxel-engine's Issues

Potential optimization

So I have a potential optimization, if you want to mix rasterization and raytracing,
So when you hit a voxel using raytracing you should draw all of the visible faces of that voxel using rasterization
do your usual depth comparisons, skip pixels that already have a voxel face drawn on them for raycasting, except for the edges, because of anti aliasing. (use a sobel edge filter)

The reason I think this might work is that any other visible voxels aren't going to be entirely smack dab on the voxel you've drawn, they're going to be slightly offsetted, larger, or entirely not visible, and using the depth comparison you can draw them in the correct order anyway, letting you skip raytracing to each and every pixel, only ones that haven't been drawn to yet.

This method should work as long as you rasterize every part of the voxel that should be visible.

I'm going to make a diagram in blender for this, of course transparent voxels still need the full raycasting treatment, until the ray hits a solid, anyway.
image
Look at this line of cubes, try and find a scenario where one cube entirely covers up another when it's not supposed to. Make new screenshots even, show a scenario where one cube that's supposed to be drawn would be covered up due to it's pixels already being taken entirely.

Bevy 0.12

Hey Brian,

Started forking your project and bumping to the newest bevy version 0.12 => https://github.com/SebMenozzi/bevy-voxel-engine, still WIP tho.
Also tried to find your email to reach out to you but didn't find any haha, got some ideas I would like to discuss.
If you have some time (email on my profile) :)

Cheers

Apache 2.0/MIT license request

Hey there!

As that's the default combination in Rust ecosystem, I would suggest using it.
It's quite liberal true, but as this is already open source on Github I assume this would be fitting.

Thanks for your awesome work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.