The AO baking procedure consists of the following steps: 1. Flatten the glTF hierarchy. 2. Generate a single 2D parameterization for the entire scene. 3. Embree Pass 1: Create G-Buffer using the above UVs as vert positions. 4. Embree Pass 2: Cast rays from the positions embedded in the G-Buffer. The `gltf_baker` tool is not ready for general use but already produces reasonable results for certain well-formed models.
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2019 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef RAYS_SIMPLECAMERA_H
|
|
#define RAYS_SIMPLECAMERA_H
|
|
|
|
#include <math/vec3.h>
|
|
|
|
namespace filament {
|
|
namespace rays {
|
|
|
|
/**
|
|
* SimpleCamera is used to configure "non-bake" rendering in PathTracer.
|
|
*/
|
|
struct SimpleCamera {
|
|
float aspectRatio;
|
|
filament::math::float3 eyePosition;
|
|
filament::math::float3 targetPosition;
|
|
filament::math::float3 upVector;
|
|
float vfovDegrees;
|
|
};
|
|
|
|
} // namespace rays
|
|
} // namespace filament
|
|
|
|
#endif // RAYS_SIMPLECAMERA_H
|