Coder Social home page Coder Social logo

tiny-rtx's Introduction

Tiny RTX

Download

Description

This is a little experiment, mainly for learning about NVIDIA's Vk_NV_ray_tracing extension, which allows Real-Time Ray Tracing.

Requirements

This demo should run smooth on RTX cards, I've tested it with an external RTX 2070.

If you have a GTX card, then you might be able to run the demo as well, as NVIDIA recently added RTX emulation for some cards of the GTX series (but prepare for some sloppiness).

I recommend using the latest version of node, as this project heavily depends on BigInt, N-API, WebAssembly and ESM

Screenshots

Installation

git clone https://github.com/maierfelix/tiny-rtx.git
cd tiny-rtx
npm install
npm run start

Releasing

npm run release --node-binary="window-x64-12.9.1"

Flags:

  • --node-binary: The node version to use
  • --build-node: Build node from scratch instead of using a pre-built version (from here)

Controls

  • Use your mouse buttons to rotate the camera
  • Use your mouse wheel to zoom in/out

Create your own Scene

Simply edit the main.js file in the repository

TODOs

  • Texture support
  • PBR based scattering
  • Denoise filter (A-SVGF?)

tiny-rtx's People

Contributors

maierfelix 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

tiny-rtx's Issues

The requested module 'nvk-essentials' does not provide an export named 'GLSL'

I seem to keep getting this issue :(

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;F:\GitHubStuff\tiny-rtx\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Python38\Scripts\;C:\Python38\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\NVIDIA Corporation\NVIDIA NGX;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk1.8.0_211\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\vim\vim80;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\nodejs\;C:\Users\User\AppData\Local\Microsoft\WindowsApps;;C:\Users\User\AppData\Local\Markdown Monster;C:\Users\User\AppData\Roaming\npm
9 verbose lifecycle [email protected]~start: CWD: F:\GitHubStuff\tiny-rtx
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'node --experimental-modules ./main.mjs --verbose-log' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node --experimental-modules ./main.mjs --verbose-log`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:326:16)
13 verbose stack     at EventEmitter.emit (events.js:209:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:209:13)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd F:\GitHubStuff\tiny-rtx
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
18 verbose node v12.9.0
19 verbose npm  v6.10.2
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node --experimental-modules ./main.mjs --verbose-log`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

That's from the log file.
2019-08-21T09_01_24_044Z-debug.log

Cannot run on Windows if directory contains a space.

C:\Users\FirstName LastName\source\repos\tiny-rtx>npm run start

> [email protected] start C:\Users\FirstName LastName\source\repos\tiny-rtx
> node --experimental-modules ./main.mjs --verbose-log

(node:21384) ExperimentalWarning: The ESM module loader is experimental.
(nvk) Using Vulkan v1.1.114
(nvk) Validation checks are enabled
The system cannot find the path specified.
{ Error: Command failed: C:/Users/FirstName%20LastName/source/repos/tiny-rtx/node_modules/nvk-essentials/bin/win32/bin -v
The system cannot find the path specified.

    at checkExecSyncError (child_process.js:629:11)
    at execSync (child_process.js:666:13)
    at file:///C:/Users/FirstName%20LastName/source/repos/tiny-rtx/node_modules/nvk-essentials/index.mjs:14:15
    at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
  status: 1,
  signal: null,
  output:
   [ null,
     <Buffer >,
     <Buffer 54 68 65 20 73 79 73 74 65 6d 20 63 61 6e 6e 6f 74 20 66 69 6e 64 20 74 68 65 20 70 61 74 68 20 73 70 65 63 69 66 69 65 64 2e 0d 0a> ],
  pid: 25656,
  stdout: <Buffer >,
  stderr:
   <Buffer 54 68 65 20 73 79 73 74 65 6d 20 63 61 6e 6e 6f 74 20 66 69 6e 64 20 74 68 65 20 70 61 74 68 20 73 70 65 63 69 66 69 65 64 2e 0d 0a> }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node --experimental-modules ./main.mjs --verbose-log`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\FirstName LastName\AppData\Roaming\npm-cache\_logs\2019-08-19T15_49_31_389Z-debug.log

Clicking "Maximise" button in Windows causes crash

file:///C:/tiny-rtx/src/utils.mjs:12
        throw new Error(`Vulkan assertion failed with ${key}`);
        ^

Error: Vulkan assertion failed with VK_ERROR_OUT_OF_DATE_KHR
    at ASSERT_VK_RESULT (file:///C:/tiny-rtx/src/utils.mjs:12:15)
    at RayTracingDemo.VulkanApplication.drawDefaultFrame (file:///C:/tiny-rtx/src/VulkanApplication.mjs:126:3)
    at RayTracingDemo.drawFrame (file:///C:/tiny-rtx/src/index.mjs:174:8)
    at Timeout.drawLoop [as _onTimeout] (file:///C:/tiny-rtx/src/index.mjs:152:9)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node --experimental-modules ./main.mjs --verbose-log`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

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.