#include "dxstdafx.h"
#include "resource.h"
#include <time.h>
#include "Cube.h"
#include "Mesh.h"
#include "Parameters.h"
#include "EnvMap.h"
Defines | |
#define | MESH0 L"Media\\Objects\\room.x" |
#define | MESH1 L"Media\\Objects\\sphere.x" |
#define | MESH2 L"Media\\Objects\\column.x" |
#define | MESH3 L"Media\\Objects\\teapot.x" |
#define | MESH4 L"Media\\Objects\\ring.x" |
#define | MESH5 L"Media\\Objects\\lamp01.x" |
#define | MESH6 L"Media\\Objects\\happy.x" |
#define | MESH7 L"Media\\Objects\\dragon.x" |
#define | MESH8 L"Media\\Objects\\bunny.x" |
#define | MESH9 L"Media\\Objects\\skullocc.x" |
#define | TEX0 L"Media\\Maps\\white.png" |
#define | TEX1 L"Media\\Maps\\pixel-grid-gy.png" |
#define | TEX2 L"Media\\Maps\\fire.jpg" |
#define | ROOM_TEXTURE L"Media\\Maps\\pixel-grid-b.png" |
#define | CUBEMAP_SIZE 128 |
size of the cube map taken from the reference point of the object | |
#define | M 10 |
Number of samples when precomputing geometric factors. | |
Functions | |
float | eval (float cos_theta, float dw) |
Calculates the reflectivity integral for a given texel. | |
float | evaluate (float dx, float dy) |
Variables | |
int | LR_CUBEMAP_SIZE = 2 |
size of the cube map for diffuse/glossy reflections | |
Parameters | pp |
HELPER CLASS TO MANAGE VARIOUS PARAMETERS. | |
bool | bPreproc = false |
|
size of the cube map taken from the reference point of the object
|
|
Number of samples when precomputing geometric factors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Calculates the reflectivity integral for a given texel. The angle between the surface normal and texel center is described by cos_theta and the solid angle occupied by the texel is denoted by dw. Instead of evaluating the reflectivity integral with only one sample belongig to the texel center (that would give us a result of cos_theta x dw), we use 2 M x 2 M x M regulary spaced samples, and discard those that lie outside the unit hemisphere. The remaining samples are regulary distributed over the hemisphere. For each sample, we check if it lies inside the cone of the specified solid angle. If yes, its contribution is considered. |
|
|
|
|
|
size of the cube map for diffuse/glossy reflections
|
|
HELPER CLASS TO MANAGE VARIOUS PARAMETERS.
|