Show both prepared LOD levels in renderer example
This commit is contained in:
@@ -51,6 +51,8 @@ build/linux-debug/faset_p2_visibility_example direct /tmp/p2-direct.ppm
|
||||
|
||||
The example creates a fine cube and a prepared coarse tetrahedron in
|
||||
[`examples/renderer/p2_visibility.cpp`](https://github.com/emil28092005/Faset_Engine/blob/main/examples/renderer/p2_visibility.cpp).
|
||||
Its near object selects LOD 0 and the eight smaller objects select LOD 1;
|
||||
the program prints those counts and reports Vulkan validation errors.
|
||||
Imported GLB geometry can be supplied as prepared levels by C++ integration,
|
||||
but automatic LOD generation and assigning a GLB's alternate meshes as LODs in
|
||||
the Inspector are not implemented yet.
|
||||
|
||||
@@ -61,7 +61,10 @@ int main(int argc, char** argv) {
|
||||
item.mesh = cube_mesh();
|
||||
item.lod_meshes = {prepared_coarse};
|
||||
item.instance_key = "example/cube/" + std::to_string(i);
|
||||
item.model = transform({float(i - 4) * 1.8f, 0, i % 2 ? -5.f : 0.f});
|
||||
const bool near_detail = i == 2;
|
||||
item.model = transform({float(i - 4) * 1.8f, 0,
|
||||
near_detail ? 6.f : (i % 2 ? -5.f : 0.f)},
|
||||
{}, near_detail ? Vec3{4, 4, 4} : Vec3{1, 1, 1});
|
||||
item.color = {0.28f + .07f * i, .6f, .8f, 1};
|
||||
item.cast_shadow = false;
|
||||
frame.draws.push_back(std::move(item));
|
||||
|
||||
Reference in New Issue
Block a user