diff --git a/examples/glTFViewer/Camera.inl b/examples/glTFViewer/Camera.inl index ace6e60eb7..62134f40b9 100644 --- a/examples/glTFViewer/Camera.inl +++ b/examples/glTFViewer/Camera.inl @@ -54,7 +54,7 @@ class Camera { eye4 = glm::rotate(glm::mat4(), _azimuth, glm::vec3(0, 1, 0)) * eye4; _eyeDir = glm::vec3(eye4); - _view = glm::lookAt(_center + _eyeDir * _radius, _center, glm::vec3(0, 1, 0)); + _view = glm::lookAt(_center + _eyeDir * _radius, _center, glm::vec3(0, -1, 0)); _dirty = false; } float _azimuth; diff --git a/examples/glTFViewer/glTFViewer.cpp b/examples/glTFViewer/glTFViewer.cpp index 8e73ff988b..7e24cc113c 100644 --- a/examples/glTFViewer/glTFViewer.cpp +++ b/examples/glTFViewer/glTFViewer.cpp @@ -274,7 +274,8 @@ namespace { nxt::BindGroupLayout bindGroupLayout = utils::MakeBindGroupLayout( device, { {0, nxt::ShaderStageBit::Vertex, nxt::BindingType::UniformBuffer}, - {1, nxt::ShaderStageBit::Fragment, nxt::BindingType::Sampler}, + {1, hasTexture ? nxt::ShaderStageBit::Fragment : kNoStages, + nxt::BindingType::Sampler}, {2, hasTexture ? nxt::ShaderStageBit::Fragment : kNoStages, nxt::BindingType::SampledTexture}, }); @@ -608,7 +609,7 @@ namespace { if (buttons[2] || (buttons[0] && buttons[1])) { camera.pan(-dX * 0.002f, dY * 0.002f); } else if (buttons[0]) { - camera.rotate(dX * -0.01f, dY * 0.01f); + camera.rotate(dX * 0.01f, dY * 0.01f); } else if (buttons[1]) { camera.zoom(dY * -0.005f); }