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,12 +22,12 @@
#define COMMON_HOST_DEVICE
#ifdef __cplusplus
#include "nvmath/nvmath.h"
#include <glm/glm.hpp>
// GLSL Type
using vec2 = nvmath::vec2f;
using vec3 = nvmath::vec3f;
using vec4 = nvmath::vec4f;
using mat4 = nvmath::mat4f;
using vec2 = glm::vec2;
using vec3 = glm::vec3;
using vec4 = glm::vec4;
using mat4 = glm::mat4;
using uint = unsigned int;
#endif

View file

@ -69,7 +69,8 @@ void main()
vec3 absN = abs(worldNrm);
float maxC = max(max(absN.x, absN.y), absN.z);
worldNrm = (maxC == absN.x) ? vec3(sign(worldNrm.x), 0, 0) :
(maxC == absN.y) ? vec3(0, sign(worldNrm.y), 0) : vec3(0, 0, sign(worldNrm.z));
(maxC == absN.y) ? vec3(0, sign(worldNrm.y), 0) :
vec3(0, 0, sign(worldNrm.z));
}
// Vector toward the light