Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (VULKAN_SDK)
set(ENV{VULKAN_SDK} ${VULKAN_SDK})
endif()

find_package(vsg 0.2.2 REQUIRED)
find_package(vsg 0.2.4 REQUIRED)

# find the optional vsgExamples that can be used for reading and range of image and 3d model formats and shader compilation
find_package(vsgXchange QUIET)
Expand Down
6 changes: 3 additions & 3 deletions data/models/lz.vsgt
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ void main()
NumUserObjects 0
depthTestEnable 1
depthWriteEnable 1
depthCompareOp 1
depthCompareOp 4
depthBoundsTestEnable 0
stencilTestEnable 0
front.failOp 0
Expand Down Expand Up @@ -14025,7 +14025,7 @@ void main()
NumUserObjects 0
depthTestEnable 1
depthWriteEnable 1
depthCompareOp 1
depthCompareOp 4
depthBoundsTestEnable 0
stencilTestEnable 0
front.failOp 0
Expand Down Expand Up @@ -36428,7 +36428,7 @@ void main()
NumUserObjects 0
depthTestEnable 1
depthWriteEnable 1
depthCompareOp 1
depthCompareOp 4
depthBoundsTestEnable 0
stencilTestEnable 0
front.failOp 0
Expand Down
4 changes: 2 additions & 2 deletions data/models/raytracing_scene.vsgt
Original file line number Diff line number Diff line change
Expand Up @@ -7660,7 +7660,7 @@ void main()
NumUserObjects 0
depthTestEnable 1
depthWriteEnable 1
depthCompareOp 1
depthCompareOp 4
depthBoundsTestEnable 0
stencilTestEnable 0
}
Expand Down Expand Up @@ -8488,7 +8488,7 @@ void main()
NumUserObjects 0
depthTestEnable 1
depthWriteEnable 1
depthCompareOp 1
depthCompareOp 4
depthBoundsTestEnable 0
stencilTestEnable 0
}
Expand Down
2 changes: 1 addition & 1 deletion data/models/teapot.vsgt
Original file line number Diff line number Diff line change
Expand Up @@ -5765,7 +5765,7 @@ void main()
NumUserObjects 0
depthTestEnable 1
depthWriteEnable 1
depthCompareOp 1
depthCompareOp 4
depthBoundsTestEnable 0
stencilTestEnable 0
}
Expand Down
2 changes: 1 addition & 1 deletion examples/state/vsgstateswitch/vsgstateswitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int main(int argc, char** argv)
VkClearAttachment color_attachment{VK_IMAGE_ASPECT_COLOR_BIT, 0, colorClearValue};

VkClearValue depthClearValue{};
depthClearValue.depthStencil = {1.0f, 0};
depthClearValue.depthStencil = {0.0f, 0};
VkClearAttachment depth_attachment{VK_IMAGE_ASPECT_DEPTH_BIT, 1, depthClearValue};

VkClearRect rect{secondary_camera->getRenderArea(), 0, 1};
Expand Down
10 changes: 5 additions & 5 deletions examples/viewer/vsganaglyphicstereo/vsganaglyphicstereo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,13 @@ int main(int argc, char** argv)
double shear = (eyeSeperation / screenWidth) * 0.8; // quick hack to get convergence roughly coincident with the trackball center.

// create the left eye camera
auto left_relative_perspective = vsg::RelativeProjection::create(perspective, vsg::translate(-shear, 0.0, 0.0));
auto left_relative_view = vsg::RelativeViewMatrix::create(lookAt, vsg::translate(-0.5 * eyeSeperation, 0.0, 0.0));
auto left_relative_perspective = vsg::RelativeProjection::create(vsg::translate(-shear, 0.0, 0.0), perspective);
auto left_relative_view = vsg::RelativeViewMatrix::create(vsg::translate(-0.5 * eyeSeperation, 0.0, 0.0), lookAt);
auto left_camera = vsg::Camera::create(left_relative_perspective, left_relative_view, vsg::ViewportState::create(window->extent2D()));

// create the left eye camera
auto right_relative_perspective = vsg::RelativeProjection::create(perspective, vsg::translate(shear, 0.0, 0.0));
auto right_relative_view = vsg::RelativeViewMatrix::create(lookAt, vsg::translate(0.5 * eyeSeperation, 0.0, 0.0));
auto right_relative_perspective = vsg::RelativeProjection::create(vsg::translate(shear, 0.0, 0.0), perspective);
auto right_relative_view = vsg::RelativeViewMatrix::create(vsg::translate(0.5 * eyeSeperation, 0.0, 0.0), lookAt);
auto right_camera = vsg::Camera::create(right_relative_perspective, right_relative_view, vsg::ViewportState::create(window->extent2D()));

// add close handler to respond the close window button and pressing escape
Expand All @@ -340,7 +340,7 @@ int main(int argc, char** argv)

// clear the depth buffer before view2 gets rendered
VkClearValue clearValue{};
clearValue.depthStencil = {1.0f, 0};
clearValue.depthStencil = {0.0f, 0};
VkClearAttachment depth_attachment{VK_IMAGE_ASPECT_DEPTH_BIT, 1, clearValue};
VkClearRect rect{right_camera->getRenderArea(), 0, 1};
auto clearAttachments = vsg::ClearAttachments::create(vsg::ClearAttachments::Attachments{depth_attachment}, vsg::ClearAttachments::Rects{rect});
Expand Down
2 changes: 1 addition & 1 deletion examples/viewer/vsgcameras/vsgcameras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int main(int argc, char** argv)
vsg::CommandLine arguments(&argc, argv);

auto windowTraits = vsg::WindowTraits::create();
windowTraits->windowTitle = "Multiple Views";
windowTraits->windowTitle = "vsgcamera - Multiple Views with different ways of configurating/tracking Cameras";
windowTraits->debugLayer = arguments.read({"--debug", "-d"});
windowTraits->apiDumpLayer = arguments.read({"--api", "-a"});
if (arguments.read({"--window", "-w"}, windowTraits->width, windowTraits->height)) { windowTraits->fullscreen = false; }
Expand Down
2 changes: 1 addition & 1 deletion examples/viewer/vsgheadless/vsgheadless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ int main(int argc, char** argv)
renderGraph->renderArea.extent = extent;
renderGraph->clearValues.resize(2);
renderGraph->clearValues[0].color = {{0.2f, 0.2f, 0.4f, 1.0f}};
renderGraph->clearValues[1].depthStencil = VkClearDepthStencilValue{1.0f, 0};
renderGraph->clearValues[1].depthStencil = VkClearDepthStencilValue{0.0f, 0};

renderGraph->addChild(vsg::View::create(camera, vsg_scene));

Expand Down
4 changes: 2 additions & 2 deletions examples/viewer/vsgmultigpu/vsgmultigpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ int main(int argc, char** argv)
if (powerWall)
{
// assume a power wall layout
auto relative_perspective = vsg::RelativeProjection::create(perspective, vsg::translate(double(numScreens - 1) - 2.0 * double(i), 0.0, 0.0));
auto relative_perspective = vsg::RelativeProjection::create(vsg::translate(double(numScreens - 1) - 2.0 * double(i), 0.0, 0.0), perspective);
camera = vsg::Camera::create(relative_perspective, lookAt, vsg::ViewportState::create(window->extent2D()));
}
else
Expand All @@ -286,7 +286,7 @@ int main(int argc, char** argv)
double fovY = 30.0;
double fovX = atan(tan(vsg::radians(fovY) * 0.5) * aspectRatio) * 2.0;
double angle = fovX * (double(i) - double(numScreens - 1) / 2.0);
auto relative_view = vsg::RelativeViewMatrix::create(lookAt, vsg::rotate(angle, 0.0, 1.0, 0.0));
auto relative_view = vsg::RelativeViewMatrix::create(vsg::rotate(angle, 0.0, 1.0, 0.0), lookAt);
camera = vsg::Camera::create(perspective, relative_view, vsg::ViewportState::create(window->extent2D()));
}

Expand Down
2 changes: 1 addition & 1 deletion examples/viewer/vsgmultiviews/vsgmultiviews.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int main(int argc, char** argv)
VkClearAttachment color_attachment{VK_IMAGE_ASPECT_COLOR_BIT, 0, colorClearValue};

VkClearValue depthClearValue{};
depthClearValue.depthStencil = {1.0f, 0};
depthClearValue.depthStencil = {0.0f, 0};
VkClearAttachment depth_attachment{VK_IMAGE_ASPECT_DEPTH_BIT, 1, depthClearValue};

VkClearRect rect{secondary_camera->getRenderArea(), 0, 1};
Expand Down
2 changes: 1 addition & 1 deletion examples/viewer/vsgortho/vsgortho.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int main(int argc, char** argv)
{
// set up defaults and read command line arguments to override them
auto windowTraits = vsg::WindowTraits::create();
windowTraits->windowTitle = "vsgviewer";
windowTraits->windowTitle = "vsgorth - Orthographics Projection Matrix";

// set up defaults and read command line arguments to override them
vsg::CommandLine arguments(&argc, argv);
Expand Down
2 changes: 1 addition & 1 deletion examples/viewer/vsgoverlay/vsgoverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int main(int argc, char** argv)

// clear the depth buffer before view2 gets rendered
VkClearValue clearValue{};
clearValue.depthStencil = {1.0f, 0};
clearValue.depthStencil = {0.0f, 0};
VkClearAttachment attachment{VK_IMAGE_ASPECT_DEPTH_BIT, 1, clearValue};
VkClearRect rect{VkRect2D{VkOffset2D{0, 0}, VkExtent2D{width, height}}, 0, 1};
auto clearAttachments = vsg::ClearAttachments::create(vsg::ClearAttachments::Attachments{attachment}, vsg::ClearAttachments::Rects{rect});
Expand Down
2 changes: 1 addition & 1 deletion examples/viewer/vsgrendertotexture/vsgrendertotexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ vsg::ref_ptr<vsg::RenderGraph> createOffscreenRendergraph(vsg::Context& context,

rendergraph->clearValues.resize(2);
rendergraph->clearValues[0].color = {{0.4f, 0.2f, 0.4f, 1.0f}};
rendergraph->clearValues[1].depthStencil = VkClearDepthStencilValue{1.0f, 0};
rendergraph->clearValues[1].depthStencil = VkClearDepthStencilValue{0.0f, 0};

return rendergraph;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/viewer/vsgscreenshot/vsgscreenshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ class ScreenshotHandler : public vsg::Inherit<vsg::Visitor, ScreenshotHandler>
size_t num_unset_depth = 0;
for (auto& value : *imageData)
{
if (value == 1.0f)
if (value == 0.0f)
++num_unset_depth;
else
++num_set_depth;
Expand Down
1 change: 1 addition & 0 deletions examples/viewer/vsgsubpass/vsgsubpass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ int main(int argc, char** argv)
auto viewer = vsg::Viewer::create();

auto traits = vsg::WindowTraits::create();
traits->windowTitle = "vsgsubpass - RenderPass setup + Subpass handling";
traits->width = width;
traits->height = height;
//traits->shareWindow = shareWindow;
Expand Down