-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathweighting.h
30 lines (23 loc) · 1.06 KB
/
weighting.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
////////////////////////////////////////////////////////////////////////
//
// weighting.h: Weightings to apply to a rendered image to get
// how much light comes from which point.
//
// Copyright (c) Simon Frankau 2018
//
#ifndef RADIOSITY_WEIGHTING_H
#define RADIOSITY_WEIGHTING_H
#include <vector>
// Generate a weightings array based on projecting rectangles onto a
// sphere. Assumes 90 degree field of view.
void projSubtendWeights(int resolution, std::vector<double> &weights);
// Like calcWeights, but generated analytically rather than through
// finite differences.
void calcSubtendWeights(int resolution, std::vector<double> &weights);
// Calculate forward-facing weights. Like calcSubtendWeights, but with an extra
// cos(theta) factor for the angle from facing direction.
void calcForwardLightWeights(int resolution, std::vector<double> &weights);
// Calculate sideways-facing weights. Like calcForwardLightWeights,
// but for the sideways-facing cube maps.
void calcSideLightWeights(int resolution, std::vector<double> &weights);
#endif // RADIOSITY_WEIGHTING_H