summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert')
-rw-r--r--3rdparty/bgfx/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert25
1 files changed, 25 insertions, 0 deletions
diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert
new file mode 100644
index 00000000000..caa8639a895
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert
@@ -0,0 +1,25 @@
+#version 450
+
+layout(set = 0, binding = 0) uniform Matrices
+{
+ mat4 vpMatrix;
+ mat4 wMatrix;
+ mat4x3 wMatrix4x3;
+ mat3x4 wMatrix3x4;
+};
+
+layout(location = 0) in vec3 InPos;
+layout(location = 1) in vec3 InNormal;
+
+layout(location = 0) out vec3 OutNormal;
+layout(location = 1) out vec4 OutWorldPos[4];
+
+void main()
+{
+ gl_Position = vpMatrix * wMatrix * vec4(InPos, 1);
+ OutWorldPos[0] = wMatrix * vec4(InPos, 1);
+ OutWorldPos[1] = vec4(InPos, 1) * wMatrix;
+ OutWorldPos[2] = wMatrix3x4 * InPos;
+ OutWorldPos[3] = InPos * wMatrix4x3;
+ OutNormal = (wMatrix * vec4(InNormal, 0)).xyz;
+}