WebGPU Minecraft clone

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ส.ค. 2023
  • A voxel renderer made with WebGPU. At the time of this video, WebGPU is only enabled by default in Chromium browsers on MacOS, ChromeOS, and Windows (Direct3D 12, not 11).
    sheeptester.github.io/words-g...
    WebGPU is a nice API, even though I'm not using any of the new functionality it offers. It may be a bit more verbose and lower level than WebGL, but it's a lot easier to learn, and the code is a lot easier to read. Shaders are pleasant to write in since the documentation is all in one place and has a Rust-like syntax.
    This project was more of a rendering experiment to learn WebGPU and GPU graphics in general, so I focused more on creating block faces with instanced rendering (the CPU only uploads block coordinates rather than vertex coordinates or indices to the GPU) and post-processing effects like chromatic aberration. My next step for this would be to try implementing ambient occlusion, but that seems too daunting and I'm too lazy to do that.
    Because this was more of a GPU-focused project, I didn't really focus on things that are done on the CPU, particularly such as optimizing the mesh generation of the chunk, since I felt like I could probably have done it already if I were held at gunpoint, and I have implemented these techniques before (see the greedy meshing example below). The purpose of this isn't to make a video game, though I might use what I learn from this experiment for a browser game some day.
    I was thinking I could use this to make a 3D version of my 8th grade platformer level editor.
    Previous voxel rendering attempts:
    sheeptester.github.io/javascr... (2017, Canvas2D)
    sheeptester.github.io/platfor... (2019, WebGL)
    Greedy meshing:
    sheeptester.github.io/javascr...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 7

  • @gubgubbubbub
    @gubgubbubbub 8 หลายเดือนก่อน +1

    WebGPU for the win

  • @gubgubbubbub
    @gubgubbubbub 8 หลายเดือนก่อน +1

    GAUSSIAN KERNEL

  • @henrypoole
    @henrypoole 8 หลายเดือนก่อน +1

    This is cool!

  • @gubgubbubbub
    @gubgubbubbub 8 หลายเดือนก่อน +1

    Let's go

  • @gubgubbubbub
    @gubgubbubbub 8 หลายเดือนก่อน +3

    vi gi nette

  • @antoinelifestyle
    @antoinelifestyle 3 หลายเดือนก่อน

    Is it possible to work together on a project ? 😊