Coder Social home page Coder Social logo

asdlei99 / arche-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yangfengzzz/arche-webgpu

0.0 1.0 0.0 5.07 MB

Entity-Component Based Graphics Engine rendered by WebGPU(Dawn)

Home Page: https://arche.graphics/zh-hans/docs/intro/

License: MIT License

Shell 0.03% C++ 86.19% C 11.98% Objective-C++ 0.14% CMake 1.14% GLSL 0.49% Batchfile 0.03%

arche-cpp's Introduction

Arche-cpp - WebGPU Graphics Engine

This repository is about the implementation of Native WebGPU (Dawn) Engine. The goal of this project is not a general-purpose game engine, but to demonstrate engine technologies and tools that provide cross-platform based on WebGPU. Therefore, the development of the project is aimed at flattening and avoiding excessive encapsulation. You can refer to the internal technical implementation and apply it to your own project. For more thoughts on the project, visit the project blog.

Motivation

This project is very similar to Unity's component entity pattern (not ECS). Based on entity and component, it is easy to combine other open-source ability:

  1. ImGui: GUI system
  2. OZZ-Animation: Animation system
  3. JoltPhysics: Physics system
  4. recastnavigation: NavMesh and path-finding system

The asset pipeline is based on ozz-animation and assimp:

  1. All skeletal animation should use asset pipeline to generate OZZ files, which will compress raw-animation data and make runtime more efficiently. Now the skin only support FBX format, we will support GLTF convert in the future.
  2. All static model is loaded by using assimp which support a lot of data format and include geometry preprocessor.

Cloning && Install

This repository contains submodules for external dependencies, so when doing a fresh clone you need to clone recursively:

git clone --recursive https://github.com/ArcheGraphics/Arche-cpp.git

Existing repositories can be updated manually:

git submodule init
git submodule update

Because this project uses the SPIRV toolchain to compile shaders and implement shader reflections, and the KTX texture format requires Vulkan support, be sure to install the Vulkan toolchain (even on a Mac). At the same time, since the interface for reading SPIRV by Tint requires Vulkan support, you need to open the switch on CMakeLists.txt of dawn before compiling Tint, and install depot_tools at the same time.

cd third_party/dawn && vim CMakeLists.txt
set(ENABLE_VULKAN ON)

After all those work, use the script in third_party folder to build them all:

./build.sh

I recommend use Clion as main IDE(which can load cmake directly), but I also add xcode project which can capture metal frame when debug graphics feature.

Feature

You can read code in apps to find the feature in this code, like physics and shadow(WIP):

PhysX

You can also redirect to repos to see more effects.

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.