GithubHelp home page GithubHelp logo

adlansadou / instanced-renderer Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 32.87 MB

Vulkan based 2D renderer demonstrating use of GPU instancing with an array of textures

License: The Unlicense

C++ 48.38% GLSL 0.07% Batchfile 0.01% C 50.84% CMake 0.51% Objective-C 0.17% Shell 0.01% Roff 0.01%
vulkan learning-by-doing learning-notes graphics game-engine library graphics-programming graphics-library graphics2d

instanced-renderer's Introduction

Quick Warning Notice

This project is still under heavy development and in early stage. I'm still working on & exploring techniques, thus the API is not yet fleshed out. This is not much of a library for now and I don't expect anybody to use it at this time. Do so at your own risk and peril.

Please note that the examples might not run on your particular hardware for now because I make a few assumptions. This will be fixed of course going forward.

Features

  • Instanced rendering
  • Array of textures: indexed inside fragment shader per primitive instance
  • bare bones compute dispatch

Result: as of now, a 2D instanced renderer able to display more than 2 million sprites at high framerates (60+ fps) on entry level hardware, like a GTX 1050 ti. And twice as much on a GTX 1070.

Dependencies

  • SDL2: cross platform Windowing & swapchain abstraction
  • glm: GLSL aligment compatible math types & functions
  • imgui: for future debug GUI
  • stb_image: single header lib for image (texture) loading
  • vma : Vulkan Memory Allocator by GPUOpen

instanced-renderer's People

Contributors

adlansadou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

instanced-renderer's Issues

Querry PhysicalDevice

The current implementation only reflects my own hardware setup.

This might not work on another setup. Some people might have more than one GPU, with different capabilities.

Thus, a proper implementation needs to list all GPUs and select the right one, or a combination of available and compatible GPUs.

Querry Queue Families

Implementation needs to be improved.

Find queue families/family supporting graphics & present

If the graphics queue family does not support surface presentation, we need to to look for an additional queue that does.

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.