Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 - WebGPU Only #98

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

2.0 - WebGPU Only #98

wants to merge 5 commits into from

Conversation

BarthPaleologue
Copy link
Owner

@BarthPaleologue BarthPaleologue commented Jun 1, 2024

WebGL is a relic of the past that holds back the technologies behind Cosmos Journeyer.

WebGPU will enable compute shaders for terrain generation, asset scattering, ocean simulation and scenes as large as space itself.

Supporting both WebGPU and WebGL would be a pain, so the goal is to make sure the project works perfectly under WebGPU, and remove support for WebGL.

Examples of 1:1 scale planets in this branch (#93):

screenshot_24-7-28_22-13 (1) (1)

screenshot_24-7-28_22-05 (1)

@BarthPaleologue BarthPaleologue added the enhancement New feature or request label Jun 1, 2024
@BarthPaleologue BarthPaleologue linked an issue Jun 1, 2024 that may be closed by this pull request
@BarthPaleologue BarthPaleologue changed the title 2.0 WebGPU 2.0 - WebGPU Only Jul 17, 2024
world from uv now directly takes the non linear depth from the depth renderer. (#61)

Although it works better, there is still an issue with the clear color

Fix shader compilation errors

- fix visual issue by computing rayDir separately
- half the number of matrix inversion by inverting the projection view product

giving up on supporting WebGL #61

Supporting both WebGL and WebGPU is a pain so this branch will assume a WebGPU only future

Add missing engine init options

trying to fix materials for WebGPU

fixed glsl compilation error

Update grassVertex.glsl
also change playground depth renderers

non linear depth is needed

the clear color is important!
To enable 1st person views, a closer near plane will be needed.

WebGPU gives again <3
WebGPU ndc z range is [0,1] which enable Cosmos Journeyer to take advantage of the reverse depth buffer

The scale is staggering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use 1:1 scale planets
1 participant