Giter VIP home page Giter VIP logo

wgpu-mc's People

Contributors

accusitive avatar alexsobiek avatar birbe avatar ctrlaltdavid01 avatar dcvz avatar filiphsps avatar lucsoft avatar minegame159 avatar schitcrafter avatar sciencentistguy avatar simon-laux avatar terrarier2111 avatar the-minecraft-scientist avatar uku3lig avatar zanctarian 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

wgpu-mc's Issues

Pull requests from branches on this repo trigger GitHub Actions twice

How to replicate:

  • create a branch on wgpu-mc/wgpu-mc repo
  • create a pr from that branch -> master

Now, the Actions are executed twice, once for push once for pull_request (see: #45). Also they don't seem to be deterministic, as you can see in the pr - rustfmt and clippy fail for the push trigger, but not for the pull_request one.

Update dependencies

Wgpu and some other dependencies are out of date, an update would be desirable to get the latest perf improvements and bug fixes,
the ones i notices immediately were: wgpu (to 0.13), winit (to 0.26.1), cgmath (to 0.18)

Grass/Biome Colors

Using the grass pipeline and shader, we need to implement biome colors for things like grass and leaves. How should we implement this? My idea would be to have another atlas that is bound to the pipeline and we could take potentially take advantage of fragment shader interpolation in the biome color atlas texture to get gradients that I assume would be completely free

Scene system

Refactor MinecraftState into a data structure that represents a Scene which is passed into a render graph. this would make the engine more modular and more easy to use

No body render

изображение
Do not render the body if the player does not enable f5

Chunks getting more distorted the bigger your coordinates are

Chunks getting more distorted the bigger your coordinates are

I've noticed that the chunks in my game are getting more distorted the bigger the player's coordinates are. For example, at (0, 100, 0) the chunks look fine, but at (1000000, 100, 1000000) they appear stretched and distorted. I believe this is an issue with the way the chunks are being generated and rendered.

Steps to reproduce

  1. Start a new game
  2. Move the player to coordinates (1000000, 100, 1000000) or higher
  3. Observe the distorted chunks

Expected behavior

Chunks should be generated and rendered correctly, regardless of the player's coordinates.

Screenshots

https://cdn.discordapp.com/attachments/903679407128993825/1064267889487655042/image.png

Additional context

  • Game version: Commit a9dc10a
  • Platform: Windows 11
  • Additional Information: This issue was made with chat-gpt.

Chunks are in odd positions in Electrum

While running in Minecraft, it appears that the chunk data within a given chunk is valid (meaning there's no garbage data) but the chunks look like they're being rendered in odd positions. Seeing as there aren't any weird discontinuities in the rendered meshes, I assume that the issue is deeper than where the vertex shader thinks a chunk is, as in there's something weird with MinecraftBlockStateProvider or how it gets it's data

Expanded shader pipeline support

All pipelines should have a flexible, data-driven uniform/binding system to add support for custom features such as shadows or more advanced lighting/what-have-yous.

GPU Meshing

Move chunk mesh baking into a compute shader

Entity rendering

This includes animations. Provide a way for transformation matrices for each entity part to be uploaded

WGPU decides to not get a GPU anytime

CRASH REPORT BELOW:
`---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 2024-01-04 07:59:22
Description: wgpu-mc has panicked. Minecraft will now exit.
panicked at /home/td5038/wgpu-mc/rust/wgpu-mc/src/lib.rs:130:14:
called Option::unwrap() on a None value

java.lang.RuntimeException
at dev.birb.wgpu.render.Wgpu.rustPanic(Wgpu.java:135)
at dev.birb.wgpu.rust.WgpuNative.startRendering(Native Method)
at dev.birb.wgpu.render.Wgpu.startRendering(Wgpu.java:74)
at net.minecraft.client.main.Main.redirect$zjh000$wgpu_mc$redirectIsRunning(Main.java:545)
at net.minecraft.client.main.Main.main(Main.java:258)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Thread: Render thread
Stacktrace:
at dev.birb.wgpu.render.Wgpu.rustPanic(Wgpu.java:135)

-- This crash was caused by the Fabric mod Electrum within native Rust code. Please report this crash to the wgpu-mc developers by opening an issue and attaching this crash log at https://github.com/wgpu-mc/wgpu-mc/issues --
Details:
Stacktrace:
at dev.birb.wgpu.render.Wgpu.rustPanic(Wgpu.java:135)
at dev.birb.wgpu.rust.WgpuNative.startRendering(Native Method)
at dev.birb.wgpu.render.Wgpu.startRendering(Wgpu.java:74)
at net.minecraft.client.main.Main.redirect$zjh000$wgpu_mc$redirectIsRunning(Main.java:545)
at net.minecraft.client.main.Main.main(Main.java:258)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)

-- Uptime --
Details:
JVM uptime: 11.537s
Wall uptime: 2.018s
High-res time: 1155.377s
Client ticks: 23 ticks / 1.150s
Stacktrace:
at net.minecraft.client.MinecraftClient.addDetailsToCrashReport(MinecraftClient.java:2564)
at net.minecraft.client.MinecraftClient.printCrashReport(MinecraftClient.java:995)
at dev.birb.wgpu.render.Wgpu.rustPanic(Wgpu.java:140)
at dev.birb.wgpu.rust.WgpuNative.startRendering(Native Method)
at dev.birb.wgpu.render.Wgpu.startRendering(Wgpu.java:74)
at net.minecraft.client.main.Main.redirect$zjh000$wgpu_mc$redirectIsRunning(Main.java:545)
at net.minecraft.client.main.Main.main(Main.java:258)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)

-- Last reload --
Details:
Reload number: 1
Reload reason: initial
Finished: No
Packs: vanilla, fabric

-- System Details --
Details:
Minecraft Version: 1.20.4
Minecraft Version ID: 1.20.4
Operating System: Linux (amd64) version 6.6.8-cachyos
Java Version: 17.0.7, N/A
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
Memory: 226496512 bytes (216 MiB) / 926941184 bytes (884 MiB) up to 4024434688 bytes (3838 MiB)
CPUs: 16
Processor Vendor: AuthenticAMD
Processor Name: AMD Ryzen 7 5800H with Radeon Graphics
Identifier: AuthenticAMD Family 25 Model 80 Stepping 0
Microarchitecture: Zen 3
Frequency (GHz): -0.00
Number of physical packages: 1
Number of physical CPUs: 8
Number of logical CPUs: 16
Graphics card #0 name: GA106M [GeForce RTX 3060 Mobile / Max-Q]
Graphics card #0 vendor: NVIDIA Corporation (0x10de)
Graphics card #0 VRAM (MB): 8224.00
Graphics card #0 deviceId: 0x2560
Graphics card #0 versionInfo: unknown
Graphics card #1 name: Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]
Graphics card #1 vendor: Advanced Micro Devices, Inc. [AMD/ATI] (0x1002)
Graphics card #1 VRAM (MB): 258.00
Graphics card #1 deviceId: 0x1638
Graphics card #1 versionInfo: unknown
Virtual memory max (MB): 32251.39
Virtual memory used (MB): 8140.45
Swap memory total (MB): 24576.00
Swap memory used (MB): 78.00
JVM Flags: 0 total;
Fabric Mods:
fabric-api: Fabric API 0.91.3+1.20.4
fabric-api-base: Fabric API Base 0.4.35+78d798af4f
fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.45+78d798af4f
fabric-biome-api-v1: Fabric Biome API (v1) 13.0.15+78d798af4f
fabric-block-api-v1: Fabric Block API (v1) 1.0.14+78d798af4f
fabric-block-view-api-v2: Fabric BlockView API (v2) 1.0.3+78d798af4f
fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.45+78d798af4f
fabric-client-tags-api-v1: Fabric Client Tags 1.1.6+78d798af4f
fabric-command-api-v1: Fabric Command API (v1) 1.2.40+f71b366f4f
fabric-command-api-v2: Fabric Command API (v2) 2.2.19+78d798af4f
fabric-commands-v0: Fabric Commands (v0) 0.2.57+df3654b34f
fabric-containers-v0: Fabric Containers (v0) 0.1.81+df3654b34f
fabric-content-registries-v0: Fabric Content Registries (v0) 5.0.9+78d798af4f
fabric-convention-tags-v1: Fabric Convention Tags 1.5.9+78d798af4f
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.22+78d798af4f
fabric-data-generation-api-v1: Fabric Data Generation API (v1) 13.1.17+78d798af4f
fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.60+78d798af4f
fabric-entity-events-v1: Fabric Entity Events (v1) 1.5.28+4ced05924f
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.6.14+78d798af4f
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.71+df3654b34f
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.45+78d798af4f
fabric-gametest-api-v1: Fabric Game Test API (v1) 1.2.19+78d798af4f
fabric-item-api-v1: Fabric Item API (v1) 2.1.34+78d798af4f
fabric-item-group-api-v1: Fabric Item Group API (v1) 4.0.20+78d798af4f
fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.40+78d798af4f
fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.38+df3654b34f
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.2.29+78d798af4f
fabric-loot-api-v2: Fabric Loot API (v2) 2.1.4+78d798af4f
fabric-message-api-v1: Fabric Message API (v1) 6.0.4+78d798af4f
fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.1.59+78d798af4f
fabric-model-loading-api-v1: Fabric Model Loading API (v1) 1.0.7+78d798af4f
fabric-models-v0: Fabric Models (v0) 0.4.6+9386d8a74f
fabric-networking-api-v1: Fabric Networking API (v1) 3.1.2+78d798af4f
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 13.0.7+78d798af4f
fabric-particles-v1: Fabric Particles (v1) 1.1.6+78d798af4f
fabric-recipe-api-v1: Fabric Recipe API (v1) 2.0.15+78d798af4f
fabric-registry-sync-v0: Fabric Registry Sync (v0) 4.0.13+78d798af4f
fabric-renderer-api-v1: Fabric Renderer API (v1) 3.2.3+78d798af4f
fabric-renderer-indigo: Fabric Renderer - Indigo 1.5.3+78d798af4f
fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.50+df3654b34f
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.41+73761d2e4f
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.0.32+78d798af4f
fabric-rendering-v0: Fabric Rendering (v0) 1.1.53+df3654b34f
fabric-rendering-v1: Fabric Rendering (v1) 3.0.12+78d798af4f
fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.3.13+78d798af4f
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.11.15+78d798af4f
fabric-screen-api-v1: Fabric Screen API (v1) 2.0.16+78d798af4f
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.3.50+78d798af4f
fabric-sound-api-v1: Fabric Sound API (v1) 1.0.16+78d798af4f
fabric-transfer-api-v1: Fabric Transfer API (v1) 4.0.6+78d798af4f
fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 5.0.13+78d798af4f
fabricloader: Fabric Loader 0.15.3
java: OpenJDK 64-Bit Server VM 17
minecraft: Minecraft 1.20.4
mixinextras: MixinExtras 0.3.2
wgpu_mc: wgpu-mc 0.1
Launched Version: Fabric
Backend library: wgpu 0.18
Backend API: wgpu-mc 0.1
Window size: 0x0
GL Caps: Using framebuffer using OpenGL 3.2
GL debug messages:
Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'fabric'
Universe: 400921fb54442d18
Type: Client (map_client.txt)
Graphics mode: fancy
Render Distance: 12/12 chunks
Resource Packs: fabric
Current Language: en_us
Locale: en_US
CPU:
#@!@# Game crashed! Crash report saved to: #@!@# /home/td5038/wgpu-mc/fabric/run/crash-reports/crash-2024-01-04_07.59.22-client.txt
`

Write proper examples

Probably can remove the wgpu-mc-demo crate once this is done, maybe even move it into another repo

Fix gui scale

in my build the gui has a scale of 1, when in the settings it is 3. and most importantly, I cannot set more than 3.
Goodbye my eyes)

Chunks in the Nether are offset downwards

Description:

I've noticed that chunks in the Nether seem to be offset downwards, while otherwise being mostly fine. This is causing issues with players being able to build and navigate in the Nether.

Steps to reproduce:

  1. Enter the Nether dimension in the game
  2. Notice that chunks seem to be offset downwards

Expected outcome:

Chunks should be at the same level as the surrounding chunks, allowing for normal building and navigation.

Actual outcome:

Chunks are offset downwards, making it difficult to build and navigate in the Nether.

Notes:

Issue made with chatgpt lol

Environment:

  • Game version: Commit a9dc10a
  • Operating system: Windows 11
  • Hardware: RTX 3070 Ti, i7 12700F

Not dead

I haven't really had a lot of time to work on this project, but I'd really like to work further on it

Collaboration proposal

Hi, i am one of the members(and maintainers) of the Leafish project. Our goal is to provide an open-source rust implementation of a client which can join on java servers with versions 1.7.10-latest(with all these versions being supported by a single executable). The client can already be used to join on servers and interact with the world, although there are some bugs (notably missing textures on higher versions) and missing features(notable there is no support for microsoft accounts/auth) the client runs smoothly with 400+ fps. We are currently in the process of switching from OpenGL to WGPU. But as i am new to WGPU and new-ish to rendering in general it is really challenging to do so and requires a good chunk of work. That's there this project comes into play, i stumbled upon it while searching for wgpu things. And i have to say, it looks really promising, although there are some features missing, it's exactly what we needed. My question here really is: is this project in active development (in terms of functionality)? and would you be interested in helping us to use this as our new renderer once this project is ready to be used?
Here is a link to our project: https://github.com/Lea-fish/Leafish
Btw: We would ofc give you (in-game and out-game) credits if this collaboration works out which could boost this amazing project.

Create bind groups based on the shader graph input

wgpu allows up to 8 bind groups on my machine, which isn't sufficient for certain shaders which need a lot of data (optifine shaders, for example). The way you work around this is by expanding the usage of bind group entries and not bind groups, which means we'll need to create bind groups within the shader graph

Fix entity rendering

image

At the moment, (at least on my machine) they

  1. move across the screen delayed from your camera movements fixed
  2. are improperly positioned fixed
  3. don't always render properly (parts of the model don't appear, texture UVs are incorrect)

also, player skins need to be dealt with as a special case

Mouse not fixed in position on Macos

On Macos the mouse can go outside the window and won't control the game anymore

Ik it's like super minor but still something that eventually will have to get fixed

1.0 Roadmap

Putting these here as a general reference to what needs to be done before a stable release can be made

  • Complete entities #87
    • Player skins
  • Fluid rendering #20
  • Render layers (translucency with z-sorting, fluids, etc) #20
    • Block colors (grass, fluids)
  • Integrate item rendering and block rendering in GUIs
    • Hand rendering #106
  • Particles
  • Performance improvements (stuttering, chunk baking speed)
  • Complete block meshing (rotation, respect UV settings in the JSON)
  • AO/Smooth lighting

Render the hand

Best way here is probably to just upload the data from the game and render it directly

Create a lighting engine

Provide an array of light sources, along with information such as intensity and color.
Also provide a lightmap

Chunk mesh baking is too slow in Electrum

While running within Minecraft, chunks take too long to bake. I haven't formally made a test to see what the average was but it wasn't pretty, ranging from like 200-800ms, usually taking around like 600ms if I had to guess.

How to fix: Do a flamegraph and see where the most time is spent. Maybe there's some weird LLVM optimization we're not hitting, or maybe we need to rethink something else.

Relevant structs:
MinecraftBlockStateProvider in wgpu-mc-jni

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.