GithubHelp home page GithubHelp logo

vilbeyli / vqengine Goto Github PK

View Code? Open in Web Editor NEW
583.0 10.0 27.0 107.66 MB

Multi-threaded DirectX12 renderer w/ HDR, PBR & Multi-monitor support

License: GNU General Public License v3.0

Batchfile 0.26% CMake 0.14% C++ 89.96% C 6.67% HLSL 2.97%
directx12 renderer multithreading hlsl engine gpu realtime cpp dxgi d3d12

vqengine's Introduction

VQEngine

VQEngine is a DirectX12 renderer for prototyping of rendering techniques and experimenting with cutting edge technology.

Join the VQE Discord Channel for graphics, math and engine chatter!

Discord Banner 2

Screenshots

Data-driven (XML) Scenes & glTF Model Loading, HDRI Environment Maps, UE4's PBR model w/ IBL, ImGui UI & debug drawing, AMD FidelityFX CACAO, CAS, FSR1, SSSR, DNSR, SPD

Features

See Releases to download the source & pre-built executables.

Graphics

Display

  • HDR display support with scRGB HDR pipeline
  • Multiple window & monitor support
  • Refresh Rate
    • Custom
    • Auto (1.33 x monitor refresh rate)
    • Unlocked
  • VSync
  • Alt+Enter Borderless Fullscreen

Engine

  • Multi-threading
    • Worker threads
      • Parallel command list recording
      • Culling
      • Asset loading
    • Main + Simulation threads to decouple OS events from the update loop
  • glTF 2.0 model loading using assimp
  • Shader system
    • Shader cache
    • Multi-threaded shader compilation
    • Shader Model 5.0 (DXBC) & 6.0 (DXIL)
  • Automated build & testing scripts

Build

Make sure to have pre-requisites installed

To download the PBR & HDRI textures, run

  • Scripts/DownloadAssets.bat

Then, run one of the build scripts in Build/ folder,

  • GenerateSolutions.bat to build from source with Visual Studio
    • VQE.sln can be found in Build/SolutionFiles directory
  • PackageEngine.bat to build and package the engine in release mode and open _artifacts folder
    • VQE.exe can be found in Build/_artifacts directory

Run

Make sure to have installed

Double click VQE.exe.

Or, if you're using a terminal,

  • VQE.exe -LogConsole for logging displayed on a console
  • VQE.exe -LogFile="FileName.txt" to write out to a file.

Controls

Key
WASD+EQ Camera movement
Page Up/Down Change Environment Map
1-4 Change scenes
1 - Default Scene
2 - Sponza
3 - Geometry Test Scene
4 - Stress Test Scene
Shift+R Reload level
C Change scene camera
V Toggle VSync
M Toggle MSAA
G Toggle tonemapping gamma
J Toggle FidelityFX-SuperResolution1
B Toggle FidelityFX-CAS
N Toggle object bounding boxes
Shift+N Toggle mesh bounding boxes
Alt+Enter Toggle Fullscreen
Esc Release mouse

Settings

VQE can be configured through Data/EngineConfig.ini file

Graphics Settings
ResolutionX=<int> Sets application render resolution width
ResolutionY=<int> Sets application render resolution height
VSync=<bool>
Toggles VSync based on the specified <bool>
AntiAliasing=<bool> Toggles MSAA based on the specified <bool>
MaxFrameRate=<int> Sets maximum frame rate to the specified <int>
HDR=<bool> Toggles HDR swapchain & HDR display support

Engine
Width=<int> Sets application main window width
Height=<int> Sets application main window height
DisplayMode=<Windowed/Fulscreen> Sets Sets application main window mode: Windowed or Fullscreen

Command Line

VQE supports the following command line parameters:

CMD Line Parameter Description
-LogConsole Launches a console window that displays log messages
-LogFile=<string> Writes logs into an output file specified by %FILE_NAME%.

Example: VQE.exe -LogFile=Logs/log.txt
will create Logs/ directory if it doesn't exist, and write log messages to the log.txt file
-Test Launches the application in test mode:
The app renders a pre-defined amount of frames and then exits.
-TestFrames=<int> Application runs the sepcified amount of frames and then exits.
Used for Automated testing.

Example: VQE.exe -TestFrames=1000
-W=<int>
-Width=<int>
Sets application main window width to the specified amount
-H=<int>
-Height=<int>
Sets application main window height to the specified amount
-ResX=<int> Sets application render resolution width
-ResY=<int> Sets application render resolution height
-FullScreen Launches in fullscreen mode
-Windowed Launches in windowed mode
-VSync Enables VSync
-VSync=<bool> Sets Specified VSync State
-AntiAliasing or -AA Enables MSAA
-TripleBuffering Initializes SwapChain with 3 back buffers
-DoubleBuffering Initializes SwapChain with 2 back buffers

Note: Command line parameters will override the EngineSettings.ini values.

Scripts

File
GenerateSolutions.bat What it does
- Initializes the submodule repos
- Runs CMake to generate visual studio solution files in Build/SolutionFiles directory
- Launches Visual Studio

Flags
- noVS : Updates/Generates VQE.sln without launching a Visual Studio instance

Example : GenerateSolutions.bat -noVS
while VS is open to update solution files after modifying CmakeLists.txt without closing/relaunching VS
PackageEngine.bat What it does
- Runs GenerateSolutions.bat if the visual studio solution doesn't exist
- Builds the engine in Release configuration
- Moves build output into Build/_artifacts folder

Flags
-Clean : Runs Clean on VQE.sln projects before building
-DebugOnly : Builds the Debug binaries only
-Debug : Builds Debug binaries in addition to Release
-RelWithDebInfo : Builds the Release binaries with Debug info in addition to Release

Note: Release build is always on by default, unless -DebugOnly is specified

Example: PackageEngine.bat -Clean -Debug -RelWithDebInfo
will build all configurations after running Clean and copy the binaries into Build/_artifacts folder
TestVQE.bat What it does
- Runs VQE.exe with testing parameters, making the engine exit after rendering specified number of frames (1000 default).

Flags
-Debug: Tests the Debug build in addition to the Release build

3rd-Party

vqengine's People

Contributors

abepoppy avatar vilbeyli 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

vqengine's Issues

Cube Rendering

  • Cube geometry
  • Depth buffer
  • Transformations
  • constant buffer functionality
  • unlit shader
  • Math lib

Remove Exclusive fullscreen setting/mode and use borderless as the default fullscreen mode

Reasonsing

  • When Exclusive fullscreen changes the resolution, the display mode is changed
  • Alt+Tab transitions are slow
  • Application exit is slow due to SetFullscreen() call
  • There's no added benefit in supporting exclusive fullscreen
  • The only time the user will have to do extra work is when the monitor has different refresh rate support for different resolutions.
    • Example
      • 2160p@60FPS
      • 1440p@144FPS
    • The user would have to change the display settings themselves before launching the app

Also : https://devblogs.microsoft.com/directx/demystifying-full-screen-optimizations/

ImGUI integration

  • ImGUI integration
  • Basic Layout / control windows
  • Mouse input
  • Engine Game mode vs UI mode capture
  • Deferred events from UI dropdowns: scene load, env map load
  • Profiler FPS sliding average
  • Profiler frame time chart

Generic Multi-window management

To be done after some shadowing lights are supported.

Until then, Main + Debug window will be the only two windows.

TODO

  • Shadow Views on dedicated windows

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.