Giter Site home page Giter Site logo

kwark's Introduction

Kwark

This project is a basic .bsp file loader / viewer.

Motivation

I've written a few renderers for outside scenes, but wanted to try writing one for internal scenes. Using the models and textures stored in Quake's pak0 is an easy way to get models, textures and other resources to test the renderer with.

With this project I'm mostly trying to familiarize myself with Vulkan fundamentals --- to see how everything fits together in a very simple renderer.

I'm also learning a lot about how the various Quake engines work, especially the original software renderer and the vkQuake renderer. That's been fascinating, particularly the limitations OpenGL imposed that weren't present in the software renderer and on the other hand all the work that had to be done to make the software renderer interactive.

Why not start with the Quake source?

It would have been easier in some ways to simply copy the GLQuake source and work on a Vulkan port. This is the approach taken by vkQuake.

I didn't want to do this mainly because trying to figure out as much as I can from incomplete write ups is more fun. I'm also not really interested in writing a complete client, since that's been done before.

A side effect of this is that I'm not constrained by the approach of the old code. Maybe this means I can do some of the things in a more modern way and explore more of Vulkan's functionality.

Progress Screenshot

TODO

  • ✅ Level models
  • ✅ Textures
  • ✅ Light maps
  • 🔲 Handle fullbrights
  • ✅ Animate light maps
  • ✅ Solve "missing" light maps
  • 🔲 Dynamic lights
  • ✅ Remove debug brushes from display
  • ✅ Sky textures
  • ✅ Animated sky textures
  • ✅ Parralax sky textures
  • ✅ Fix projection of sky textures
  • ✅ Animated slime / lava / water textures
  • 🔲 Under water effect
  • ✅ Alias model loading
  • ✅ Fire model
  • ✅ Other scenery models
  • ✅ Monster models
  • ✅ Monster animation

Remarks

Bindless textures in Vulkan were useful. Since Quake uses so few textures per level (~60) it's possible to load them all into a sampler array and pass a texture index along with the vertex data.

Similarly, the entire light map for a level fits in a uniform texel buffer. So all the lighting calculations can be done in the fragment shader.

kwark's People

Contributors

fluffels avatar

Watchers

 avatar

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.