Giter Site home page Giter Site logo

raytracing's Introduction

Ray Tracing

A brand new educational YouTube series by Cherno. This repository contains all of the code for this project; most episodes will have their own commit you can browse.

Building and running

Officially supports Windows 10/11 and Visual Studio 2022, with more platforms coming soon. You'll need to have the Vulkan SDK installed.

  1. Clone recursively: git clone --recursive https://github.com/TheCherno/RayTracing
  2. Run scripts/Setup.bat
  3. Open RayTracing.sln and hit F5 (preferably change configuration to Release or Dist first, Debug is slow)

raytracing's People

Contributors

thecherno 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raytracing's Issues

Multithreading and Optimization Discussion

Hey all! For those following along with the series on YouTube, I hope you've been enjoying it thus far! In the latest episode (Ep 11), we introduced multithreading into our code base by using std::for_each with the parallel execution policy. I mentioned that if the community has any other suggestions, and wants to do some testing to see if we can multithread in a more efficient way, I'd open a GitHub issue for this discussion - and here we are!

I figured crowd-sourcing this would be a good idea since your mileage may vary - certain techniques might be better or worse on certain hardware and architectures. Feel free to fork this repository and implement something, and then drop it in a comment here so we can test. If your method is faster than our std::for_each method, make sure to include some profiling data and your hardware specifications.

Thanks all! ❤️

  • Cherno

m_AccumulationData of 'Renderer' class will not initialize to a value of 0

Background

In my PC (CPU I5-8400), debug mode
m_AccumulationData of 'Renderer' class will not initialize to a value of 0

Process

The first 'Renderer::OnResize' event is not a problem:
Because the value of 'm_FrameIndex' is 1, 'memset' will be called to initialize
image

The second call to 'Renderer::OnResize' will not call memset because 'm_FrameIndex' is not equal to 1, resulting in 'm_AccumulationData' being all is a negative number:
image

Thanks

Getting error when compiling, something about the input

I get this error when I try to compile:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: static class Walnut::Application & __cdecl Walnut::Application::Get(void)" (?Get@Application@Walnut@@SAAEAV12@XZ) referenced in function "public: static struct glm::vec<2,float,0> __cdecl Walnut::Input::GetMousePosition(void)" (?GetMousePosition@Input@Walnut@@sa?AU?$vec@$01M$0A@@glm@@xz) RayTracing C:\Users\Student\Documents\SA RayTracing\RayTracing\RayTracing\Walnut.lib(Input.obj) 1

I don't know what to do, I haven't found anything helpful online either.

Converting code to run on the GPU

Hi, I'm quite new to Vulkan, but I wanted to see if anyone could give me directives on how to modify the project to run on the GPU.

There's a bunch of resources out there (I've listed a few below), but I'm not sure how all of these tie in to work with the current codebase.

Is there any way I can modify the current code to reproduce something similar to the examples above?

Wont Build for me ?

Thanks for providing this for free.

I followed the instructions here, using latest vs 2022

  1. Clone recursively: git clone --recursive https://github.com/TheCherno/RayTracing
  2. Run scripts/Setup.bat
  3. Open RayTracing.sln and hit F5

I cant get the sln to build, get various files not found, not sure if I have missed something or there is a path missing in the sln setup ?

A selection of the errors I get
1>C:\RayTracing\Walnut\vendor\imgui\imgui.h(60,10): fatal error C1083: Cannot open include file: 'float.h': No such file or directory
2>C:\RayTracing\Walnut\vendor\glfw\include\GLFW\glfw3.h(103,10): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory

4>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include\yvals.h(12,10): fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory
4>Done building project "RayTracing.vcxproj" -- FAILED.

Any thoughts on how to fix this would be appreciated, thanks.

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.