From 636807e68a85a978473764d171ed0c7cc36f9be6 Mon Sep 17 00:00:00 2001 From: lbavoil Date: Thu, 15 Mar 2018 11:08:34 +0100 Subject: HBAO+ 4.0.0.23740451 --- samples/dual_layer/D3D11/src/Scene.cpp | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 samples/dual_layer/D3D11/src/Scene.cpp (limited to 'samples/dual_layer/D3D11/src/Scene.cpp') diff --git a/samples/dual_layer/D3D11/src/Scene.cpp b/samples/dual_layer/D3D11/src/Scene.cpp new file mode 100644 index 0000000..4a5b9a9 --- /dev/null +++ b/samples/dual_layer/D3D11/src/Scene.cpp @@ -0,0 +1,43 @@ +/* +* Copyright (c) 2008-2018, NVIDIA CORPORATION. All rights reserved. +* +* NVIDIA CORPORATION and its licensors retain all intellectual property +* and proprietary rights in and to this software, related documentation +* and any modifications thereto. Any use, reproduction, disclosure or +* distribution of this software and related documentation without an express +* license agreement from NVIDIA CORPORATION is strictly prohibited. +*/ + +#include "Scene.h" + + +bool Scene::InitializeDefault() +{ + std::shared_ptr actorMesh = Mesh::LoadFromFile("..\\Media\\Meshes\\shaderBall.obj"); + std::shared_ptr cubeMesh = Mesh::LoadFromFile("..\\Media\\Meshes\\cube.obj"); + + // + // Layer 1 = Foreground meshes + // + Node node; + node.mesh = actorMesh; + node.layer = 1; + + for (uint32_t i = 0; i < 4; ++i) + { + node.matWorld = XMMatrixTranslation((i % 2) * 16.0f - 8.0f, (i / 2) * 16.0f - 8.0f, 0.0f); + mNodes.push_back(node); + } + + // + // Layer 0 = Background meshes + // + node.mesh = cubeMesh; + node.matWorld = XMMatrixIdentity(); + node.layer = 0; + + mNodes.push_back(node); + + + return true; +} -- cgit v1.2.3