An experimental prototype ray tracing engine.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
16x16.ico
32x32.ico
Buffers.h
Colors.h
D3DGraphics.cpp
D3DGraphics.h
Fonts.h
FrameTimer.h
Game.cpp
Game.h
Keyboard.cpp
Keyboard.h
Lights.h
Materials.h
MathExt.h
Meshes.h
Mouse.cpp
Mouse.h
MyTemplate.vstemplate
Objects.h
Pray Engine.sln
Pray Engine.v11.suo
PrayEngine.res
PrayEngine.vcxproj
PrayEngine.vcxproj.filters
PrayEngine.vcxproj.user
README.md
ReadWrite.h
Resource.h
SLinkedList.h
Scene.h
Sound.cpp
Sound.h
Textures.h
Timer.cpp
Timer.h
Triangles.h
Vec2.h
Vectors.h
Windows.cpp
__PreviewImage.png
__TemplateIcon.png

README.md

Ray-Tracer CPU Prototype

Pray Engine is an experimental ray tracing engine which is capable of rendering analytical spheres and triangle polygons with textures. It includes features such as support for normal maps, surface transparency, colored shadows, anti-aliasing, mipmapping, and more.

It is a VS 2012 project and uses a DirectX 9 window to display the rendered result. However it doesn't use the GPU to compute anything, my next goal is to use OpenCL to handle all the parallel processing by writing totally custom kernels based on this prototype code.

Keep in mind this is only a prototype engine designed to run on the CPU. Right now it's mainly written for readability and doesn't use SSE, multi-threading, or anything else to speed it up, and the default scene isn't large enough to benefit from any of the optimization techniques used.

It is set up to load a generic scene containing a simple room and a matchbox floating in the center of the room. You can move around using the WASD keys like a normal game, but you can also tilt the camera with Q and E, and move up and down using the page up and page down keys.

When I get some free time I'll try to upload specifications for all the engine file formats. For now just check the source code if you wish to know how it works. I also made an app for converting OBJ files to the Pray Engine format if anybody is interested.

Since some of the textures in the default scene are rather large and may be copyrighted I decided not to upload them here. After downloading the archive, extract the Data folder to your project folder or the same place as the exe file and you should be ready to go.

Link to download Data folder: https://mega.nz/#!ZEoyRT4D!j-i_5jlACI0NJoZz32-cJk86Sg91TnmI7T1Y2lmwxKU

You can find a description of the methods used in this engine here: www.j-d-b.net/files/Real-Time_Ray-Tracing_Methodology.pdf

Screenshot of a scene rendered with Pray Engine using 4x AA: http://postimg.org/image/n3zs71635/

Pray Engine is based on the Chili DirectX Framework: http://www.planetchili.net/