Bulk update nvpro-samples 11/20/23

5c72ddfc0522eb6604828e74886cf39be646ba78
This commit is contained in:
Mathias Heyer 2023-11-20 13:54:44 -08:00
parent debd0d5e33
commit 0c73e8ec1b
96 changed files with 927 additions and 922 deletions

View file

@ -22,10 +22,10 @@ and the acceleration structure does not deal with this well.
~~~~ C++
helloVk.loadModel(nvh::findFile("media/scenes/plane.obj", defaultSearchPaths),
nvmath::scale_mat4(nvmath::vec3f(2.f, 1.f, 2.f)));
glm::scale(glm::mat4(1.f),glm::vec3(2.f, 1.f, 2.f)));
helloVk.loadModel(nvh::findFile("media/scenes/wuson.obj", defaultSearchPaths));
uint32_t wusonId = 1;
nvmath::mat4f identity{1};
glm::mat4 identity{1};
for(int i = 0; i < 20; i++)
helloVk.m_instances.push_back({identity, wusonId});
~~~~
@ -57,8 +57,8 @@ void HelloVulkan::animationInstances(float time)
{
int wusonIdx = i + 1;
auto& transform = m_instances[wusonIdx].transform;
transform = nvmath::rotation_mat4_y(i * deltaAngle + offset)
* nvmath::translation_mat4(radius, 0.f, 0.f);
transform = glm::rotation_mat4_y(i * deltaAngle + offset)
* glm::translate(glm::mat4(1),radius, 0.f, 0.f);
}
~~~~
@ -152,10 +152,10 @@ In this chapter, we will animate a sphere. In `main.cpp`, set up the scene like
~~~~ C++
helloVk.loadModel(nvh::findFile("media/scenes/plane.obj", defaultSearchPaths, true),
nvmath::scale_mat4(nvmath::vec3f(2.f, 1.f, 2.f)));
glm::scale(glm::mat4(1.f),glm::vec3(2.f, 1.f, 2.f)));
helloVk.loadModel(nvh::findFile("media/scenes/wuson.obj", defaultSearchPaths, true));
uint32_t wusonId = 1;
nvmath::mat4f identity{1};
glm::mat4 identity{1};
for(int i = 0; i < 5; i++)
{
helloVk.m_instances.push_back({identity, wusonId});