Path Tracing
Loading...
Searching...
No Matches
scene.glsl File Reference
#include "cornell_scene.glsl"
Include dependency graph for scene.glsl:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void intersects_mesh (const Ray ray, inout Hit h)
bool intersects (const Ray ray, out Hit h)

Variables

uniform int SCENE_PRESET

Function Documentation

◆ intersects()

bool intersects ( const Ray ray,
out Hit h )

◆ intersects_mesh()

void intersects_mesh ( const Ray ray,
inout Hit h )

BVH node stack

Note
Reduced from 128, since the worst case scenario with millions of triangles will have a depth of ~20-28
Assumes OpenGL-convention normal maps (+Y up) If an asset looks inverted on one axis, it was made for DirectX and needs to flip the G channel

BVH descends directly to the nearer child, avoids stack traffic; pushes only the farther one, only if it was hit too

Variable Documentation

◆ SCENE_PRESET

uniform int SCENE_PRESET

Chooses the current render preset

Note
0 = mesh only; 1 = cornell + mesh; 2 = cornell only