[ create a new paste ] login | about

Link: http://codepad.org/Y4FhRvWz    [ raw code | output | fork ]

C++, pasted on Jan 14:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <math.h>
#include <iostream>

int main()
{
    float ao_strength = 2.2;

    // Table of gamma space multiply factors.
    static const float light_amount[3] = {
        powf(0.75, 1.0 / ao_strength),
	powf(0.5,  1.0 / ao_strength),
	powf(0.25, 1.0 / ao_strength),
    };

    for (int i = 0; i < 3; i++)
        std::cout << light_amount[i] << std::endl;

    return 0;
}


Output:
1
2
3
0.877424
0.72974
0.532521


Create a new paste based on this one


Comments: