Vulkan: Raytrace / Raytracing

Peter Shirley

raytracing.github.io/
github.com/RayTracing/raytracing.github.io
Ray Tracing in One Weekend
Ray Tracing: The Next Week
Ray Tracing: The Rest of Your Life

  • eye / camera
  • image
  • 16:9 aspect ratio
  • viewport =
  • viewport’s aspect ratio == rendered image aspect ratio
  • viewport: 2 units in height
  • projection plane
  • projection point
  • distance between plane and point: 1 unit = focal length

C++

difference between global operator and member operator

Vector

Ray-triangle intersection (PDF)
Fast Minimum Storage Ray-Triangle Intersection
How to get the intersection point? Ray Triangle Intersection C++
WebGL 2.0 : 044 : Ray to Triangle Intersection

Depends on

github.com/nothings/stb, stb single-file public domain libraries for C/C++
Markdeep


OpenGL Frameworks

OpenGL Loading Library
An OpenGL Loading Library is a library that loads pointers to OpenGL functions at runtime, core as well as extensions. This is required to access functions from OpenGL versions above 1.1 on most platforms.

  • GLEW (OpenGL Extension Wrangler)
  • GL3W
  • Galogen
  • glad (Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator)
  • Glatter
  • glsdk (Unofficial OpenGL SDK)
  • glbinding (C++)
  • libepoxy
  • GLee

GLFW, GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop
GLUT (GL Utility Toolkit)
What is the difference between FreeGLUT vs GLFW?

Web

WGSL, WebGPU Shading Language

Apple

GLKit,
Metal


GLUT v3

The OpenGL Utility Toolkit (GLUT) Programming Interface API Version 3
7 Callback Registration

Scratchapixel 2.0

Learn Computer Graphics From Scratch!
The Perspective and Orthographic Projection Matrix
Ray Tracing: Rendering a Triangle – Why Are Triangles Useful?
Ray Tracing: Rendering a Triangle – Ray-Triangle Intersection: Geometric Solution
A Minimal Ray-Tracer: Rendering Simple Shapes – Ray-Sphere Intersection
Rasterization: a Practical Implementation

  • The Rasterization Algorithm
  • Optimizing: 2D Triangles Bounding Box
  • When Two Triangles Overlap the Same Pixel: The Depth Buffer (or Z-Buffer)

OpenGLBook.com

Chapter 1: Getting Started
github.com/openglbook/openglbook.com

Nikita Voloboev

Ray Tracing – Links

Canvas + WebGL

How to render 3D in 2D canvas

w3school

HTML Canvas Graphics
HTML Canvas Reference

MDN Web Docs

Einführung in WebGL
HTMLCanvasElement.getContext()
CanvasRenderingContext2D
Canvas tutorial

VICTOR KESTEN

Evaluating Different Spatial Anti Aliasing Techniques

Anti-Aliasing

Kantenglättung Anti-Aliasing erklärt – Guide: Wie funktionieren MSAA, TXAA und Co.?
Best Anti-Aliasing | Different Techniques to Get Clear Images
What is Anti-Aliasing: A definitive guide
PC Graphics Settings Explained: MLAA vs MSAA vs FXAA vs TAA vs SMAA

RayTracingInVulkan

github.com/GPSnoopy/RayTracingInVulkan, Implementation of Peter Shirley’s Ray Tracing In One Weekend book using Vulkan and NVIDIA’s RTX extension.

nvpro-samples

nvpro-samples.github.io/vk_mini_path_tracer/
nvpro-samples.github.io/vk_raytracing_tutorial_KHR/
github.com/nvpro-samples/vk_denoise, Denoising a Vulkan ray traced image using OptiX denoiser
github.com/nvpro-samples/vk_raytrace, Ray tracing glTF scene with Vulkan
github.com/nvpro-samples/vk_raytracing_tutorial_NV, Vulkan ray tracing examples and tutorials using VK_NV_ray_tracing

Vulkan Tutorial

Vulkan Tutorial

PBRVulkan

github.com/Zielon/PBRVulkan/

Quartz

github.com/Nadrin/Quartz/

FlyCube

github.com/andrejnau/FlyCube, Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.

Research Unit of Computer Graphics | TU Wien

github.com/cg-tuwien/Gears-Vk, Powerful low-level C++20 rendering framework for Vulkan 1.2, including Real-Time Ray Tracing (RTX) support, built atop Auto-Vk.
github.com/cg-tuwien/Auto-Vk, Low-level convenience and productivity layer atop Vulkan-Hpp

Window System Integration (WSI)

Qt Graphics
github.com/KhronosGroup/Vulkan-Guide/blob/master/chapters/wsi.md
Introducing the Vulkan WSI Layer (PDF)

NamePointer / carl-vbn

github.com/carl-vbn/pure-java-raytracer
github.com/carl-vbn/opengl-raytracing
Making a 3D Gravity Simulator with OpenGL (Part 1)
Adding Camera movement and User Interface to my 3D Gravity Simulator
github.com/carl-vbn/opengl-gravity-simulator
carl-vbn.dev
LinkedIn: Carl von Bonin

Daniel Elwell / frozein

The First 3 Months Developing My VOXEL RAYTRACING Engine
github.com/frozein/DoonEngine

Dr. Anton Gerdelan

Anton’s OpenGL 4 Tutorials
github.com/capnramses/antons_opengl_tutorials_book/
github.com/capnramses/antons_opengl_tutorials_book/tree/master/06_vcam_with_quaternion
github.com/AidanDelaney/antons_opengl_tutorials_book/tree/sdl2-port/

Foundations of Game Engine Development

Foundations of Game Engine Development
Foundations of Game Engine Development: Figures


YouTube

Brendan Galea

Vulkan (c++) Game Engine Tutorials

Vulkan vs. OpenGL

GDC 2018 – Getting explicit: How Hard is Vulkan really?
What Is Vulkan & Why Should Gamers CARE?
DirectX 12 & Vulkan as Fast As Possible
DCS: What is Vulkan API?
Vulkan vs OpenGL | Getting into Computer Graphics | OpenGL CUDA Interop | Cuda Education
What is Vulkan?
Should you learn Vulkan(C++)? Can beginners learn it?
Vulkan Tutorials [Deutsch]

Example

OpenGL vs Vulkan
Open GL (Default) VS Open GL (Skia) VS Vulkan (Skia) Antutu Benchmark

Window System Integration (WSI)

XDC 2019 | Introducing the Vulkan WSI Layer – Rosen Zhelev

OpenGL

Intro To Modern OpenGL Tutorial (2014)

Game Dev Academy

What is a Graphics Pipeline? Featuring DirectX 11
hat is a Shader? | Pixel and Vertex Shaders

Shader

What Are Shaders?
Writing a Shader in OpenGL
How Shaders Work in OpenGL
Vertex and Fragment Shaders – Interactive 3D Graphics
What Is A Shader? UE4 Materials 101 – Episode 1
1. What is a shader? What is GLSL? Why are they useful in games – Shader Course
Shaders 101 – Intro to Shaders
Shader Basics, Blending & Textures • Shaders for Game Devs [Part 1] (Unity)

Anti-Aliasing

Computer Graphics 2.7: Aliasing and Anti aliasing Techniques
Antialiasing – Interactive 3D Graphics

SketchpunkLabs

Fun With WebGL 2.0
WebGL 2.0 : 044 : Ray to Triangle Intersection

RuhrJS Conference

RuhrJS 2018 – Martin Splitt – Creative experiments with WebGL shaders in JavaScript

thebennybox

Intro To Modern OpenGL Tutorial (Playlist)

Reducible

Building Collision Simulations: An Introduction to Computer Graphics

The Cherno

OpenGL (Playlist), last update 2020
Welcome to OpenGL
Vertex Buffers and Drawing a Triangle in OpenGL
ImGui in OpenGL

freeCodeCamp.org

OpenGL Course – Create 3D and 2D Graphics With C++

Joshua Shucker

Planet Vulkan (Playlist)
Episode 7.5 – Graphics Pipeline Overview

NamePointer

I created my own Ray Tracing Engine from scratch

NVIDIA Developer

Arun Ravindran ArunRocks

Building a Ray Tracer in Python – Part 1 (Points in 3D Space)

First Principles of Computer Vision

Radiometry and Reflectance | Photometric Stereo | Shape from Shading (Playlist)

media.ccc.de

Introduction to OpenGLES and GLSL programming
NOT in this talk:

  • Clipping
  • Vendor Extensions
  • Geometry Shaders
  • Lightning
  • Stencils
  • Framebuffer Objects
  • Culling
  • Framerate
  • Tesselation Shaders
  • Quaternions
  • Shading
  • Blending

OpenGL

  • API for rendering 2D and 3D Computer Graphics
  • Developed by SGI in 1992
  • Open Standard, now maintained by Khronos Group consortium
  • Used in CAD, Games, VR/AR, etc…

OpenGL ES

  • OpenGL for Embedded Systems
  • Implementations by nvidia, AMD, etc.
  • Available on Windows, MacOSX, Linux, iOS, Android, etc.
  • Bindings for C, C++, Java, C#, Python, Ruby, Go, etc.
  • Latest version OpenGL ES 3.2 (2019)
  • … but anything from OpenGL ES 2.0 onwards is cool!

EGL

  • Native Platform Interface
  • Creates & Configures OpenGL ES Context (view/window/fullscreen)
  • Your platform might come with something else (Mesa, WGL, CGL, GLX, etc.)

Rasterizer

  • Describe our geomentry in world coordinates (3D)
  • Rasterizer projects it onto a projection plane (2D) => your screen
  • Geometry in projection plane are now called fragments
  • For each of the triangles, we figure out how we wan to color them
  • If we have a triangle on that surface with 3 colors, the rasterizer will interpolate the values between the colors (pixel by pixel)
  • Vertex- and Fragment-Shader go the projection and the texture mapping
  • When you render a scene, the vertex shader is responsible for taking all your geometry and transforms/moves/scales it. Then it’s passed to the Rasterizer stage that does the real projection, figuring out which vertices end up on the 2D surface (plane) => output: fragments.

GLSL Shader Language

  • C-like syntax
  • Vector and Matrix types (float, vec2, vec3, vec4, mat4, etc.)
  • Built-in math functions (sin, cos, exp, sqrt, dot, cross, etc.)
  • No recursion
  • Limited loops

Vertex Shader

  • Runs once for each vertex of each triangle of the geometry
  • Get per-vertex input from attribute
  • Global parameters: get parameters from uniform: projection from camera
  • Pass output to fragment shader in varying
  • Pass position vector to rasierizer pipeline in gl_Position (magic variable)

Fragment Shader

  • Runs once for each fragment of each rasterized triangle
  • Sets the final color for each fragment
  • Get per-vertex input from varying
  • Get parameters from uniform: get texture data from uniform sample2D
  • Pass color vector to fragment pipeline in gl_FragColor

Math

  • Vectors describe coordinates
  • Matrices describe transformations

Vector Operations

  • Scalar Multiplication / dot-product: alpha = acos(dot(u,v))
  • Vector Multiplication / cross-product: n = cross(u,v)

Transformation Matrices

  • Translate
  • Rotate
  • Scale

Projection Matrix (perspective vs. orthographic)

Matrix Operations

  • Multiplication of a vector with a matrix: transformed vector
  • Multiplication of a matric with a matrix: chained transformation

github.com/neiser/PiGLET, Raspberry PI OpenGL Epics Toolkit
Experimental Physics and
Industrial Control System, EPICS Home at Argonne

EPICS – Experimental Physics and Industrial Control System

GetIntoGameDev

github.com/amengede/getIntoGameDev

OpenGL with C++ (Playlist)
Vulkan with C++ (Playlist)
OpenGL with Python (Playlist)
OpenGL with Python – Vertex Buffer Objects and Vertex Array Objects

OGLdev – Modern OpenGL Tutorials

OGLdev – Modern OpenGL Tutorials

  • World Coordinate System
  • Local Coordinate System
  • Object Coordinate System
  • Object Space
  • View Transformation
  • Camera Transformation
  • Eye Transformation
  • Camera Coordinate System
  • View Coordinate System
  • Camera Space
  • View Space
  • Eye Space
  • Perspective Projection
  • Perspective Projection Matrix
  • = Clip Coordinate System
  • = Clip Space
  • Perspective Division
  • Range -1 ro +1 on all axes
  • = Normalized Device Coordinates (NDC)
  • Viewport Transformation
  • = Window coordinates (ex. 1920 x 1080)
  • Multiply all matrices to a single matrix
  • = WVP / MVP
  • UVN camera
  • Location / Position (x, y, z)
  • Orientation in UVN axis system
  • N vector = eye to world
  • V vector = up-vector/li>
  • U vector = right-vector/li>

David Parker (2011 – 2013)

OpenGL Screencasts and Tutorials

GamesWithGabe

How to Code Minecraft (GLFW & Glad)

github.com/codingminecraft/MinecraftCloneForYoutube
github.com/codingminecraft/StreamMinecraftClone

Dustin Biser

Quaternion Camera Demo – (C++, OpenGL)
Shadow Mapping Demo
GPU Smoke Simulations

Ressource

LinkedIn Dustin Biser
github.com/dustin-biser/Rigid3D (Arcball)

Victor Gordan

OpenGL Tutorials, 13.08.2021 (Playlist)

Ressource

LinkedIn Victor Gordan
github.com/VictorGordan/opengl-tutorials

Michael Grieco

C++ OpenGL Tutorial (Playlist)
2D Pong (C++ OpenGL) (Playlist)

Ressource

michaelg29.github.io
github.com/michaelg29/glpong
github.com/michaelg29/yt-tutorials
github.com/michaelg29/yt-tutorials/tree/master/CPP/OpenGL/OpenGLTutorial
LinkedIn Michael Grieco

Thomas Sheppard (Galway-Mayo Institute of Technology, Ireland)

Introduction to perspective projection

Build Succeeded (Direct2D)

C++ Win32 Direct2D

Ressource

github.com/BuildSucceeded/3D-Game-Engine

Pikuma

Math for Game Developers: Perspective Projection Matrix

Danakorn

Projection in Computer Graphics

Danakorn

Pythonista_

How to make a 3D projection in Python | Rendering a cube in 2D! (No OpenGL)

Ressource

github.com/Magoninho/3D-projection-tutorial


Medium

Parallelizing GPU-intensive Workloads via Multi-Queue Operations using Kompute & Vulkan


Udacity

GPU computing in Vulkan, The ultimate way to parallel computing using Vulkan API.
Learn the Vulkan API with C++, Learn the fundamentals of the popular Vulkan API for modern graphics rendering using C++!


Learn OpenGL

Advanced Lightning

Normal Mapping

TBN matrix

  • Tangent,
  • Bitangent and
  • Normal vector


GLEW

GLEW linking

1>OpenGLBook_Chapter1.obj : error LNK2001: unresolved external symbol __imp__glewGetErrorString@4
1>OpenGLBook_Chapter1.obj : error LNK2001: unresolved external symbol __imp__glewInit@0
1>C:\Users\bacr\source\repos\FreeGLUT_example2\Release\FreeGLUT_example2.exe : fatal error LNK1120: 2 unresolved externals

#define GLEW_STATIC
1>OpenGLBook_Chapter1.obj : error LNK2001: unresolved external symbol _glewGetErrorString@4
1>OpenGLBook_Chapter1.obj : error LNK2001: unresolved external symbol _glewInit@0
1>C:\Users\bacr\source\repos\FreeGLUT_example2\Release\FreeGLUT_example2.exe : fatal error LNK1120: 2 unresolved externals

>dumpbin -headers glew-2.1.0\lib\Release\Win32\glew32.lib | findstr /c:"  Symbol name  : _glewInit"
  Symbol name  : _glewInit@0

Tools for inspecting .lib files?
Problems with glew library and glewinit() function
About the use of glew library (unresolved external symbol __imp__glewInit @ 0)
Glew in VS 2010: unresolved external symbol __imp__glewInit
OpenGL: How to compile glew32.dll from source file

Build started...
1>------ Build started: Project: FreeGLUT_example2, Configuration: Release Win32 ------
1>main.cpp
1>OpenGLBook_Chapter1.cpp
1>tutorial01.cpp
1>Generating code
1>Previous IPDB not found, fall back to full compilation.
1>All 16 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
1>Finished generating code
1>FreeGLUT_example2.vcxproj -> C:\Users\bacr\source\repos\FreeGLUT_example2\Release\FreeGLUT_example2.exe
1>        1 Datei(en) kopiert.
1>        1 Datei(en) kopiert.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


io7m

r1

io7m-r1 0.10.0 Documentation
Normal Mapping
github.com/io7m/r1

r2

com.io7m.r2 0.3.0-SNAPSHOT Documentation
github.com/io7m/r2, Aggressively minimalist deferred renderer


Wikipedia

Kategorie:Bildsynthese
Framebuffer Object (FBO)
Vertex Buffer Object (VBO)
Immediate Mode
Retained Mode
Z-Buffering (auch Depth Buffering, Tiefenpuffer)
Rasterung von Polygonen


Microsoft Docs

Retained Mode Versus Immediate Mode


OpenGL Documentation

Khronos

gluPerspective — set up a perspective projection matrix
gluLookAt — define a viewing transformation

docs.GL

docs.GL (only OpenGL, no utility functions!)


Arcball

OpenGL Programming/Modern OpenGL Tutorial Arcball
How to implement a simple Arcball Camera
Arcball Controller
User controlled rotation with arcBall
arcball controls with Qt, and OpenGL

Mario Konrad

OpenGL: Tutorial 8 – ArcBall
Tutorial: OpenGL

Ressource

github.com/mariokonrad/qtnavigator
github.com/Jokymon/qtnavigator
github.com/mariokonrad/glua

YouTube

C# vs. OpenGL (Tao.Framework) – Arcball Rotation with zoom and pan
OpenGL Arcball Test
Arcball Test in C++ and OpenGL with a custom math library


Focal length

FocalLength to Fov formula in OpenGl
How to set focal length in OpenGL^_^
is focal length equal to the distance from the optical center to the near clipping plane- openGL
P2 vs projection plane

Leave a Reply

Your email address will not be published. Required fields are marked *