aboutsummaryrefslogtreecommitdiffstatsci
path: root/samples/Model/shaders/pbrtest.vert
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2019-04-24 04:17:16 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2019-04-24 04:17:16 +0200
commit2d2e2ff4038db052d0186645f5afe4ec9daf2505 (patch)
treed8491d9921381ec5d4149fdc014b72e375199dab /samples/Model/shaders/pbrtest.vert
parent25fc1c7019142137dc67e4fad0c3088d845ab0a8 (diff)
use boolean for tex0 and tex1 availability tests
Diffstat (limited to 'samples/Model/shaders/pbrtest.vert')
-rw-r--r--samples/Model/shaders/pbrtest.vert48
1 files changed, 0 insertions, 48 deletions
diff --git a/samples/Model/shaders/pbrtest.vert b/samples/Model/shaders/pbrtest.vert
deleted file mode 100644
index ffb1432..0000000
--- a/samples/Model/shaders/pbrtest.vert
+++ /dev/null
@@ -1,48 +0,0 @@
-#version 450
-
-#extension GL_ARB_separate_shader_objects : enable
-#extension GL_ARB_shading_language_420pack : enable
-
-layout (location = 0) in vec3 inPos;
-layout (location = 1) in vec3 inNormal;
-layout (location = 2) in vec2 inUV;
-
-layout (binding = 0) uniform UBO
-{
- mat4 projectionMatrix;
- mat4 viewMatrix;
- mat4 modelMatrix;
- vec4 lightPos;
- float gamma;
- float exposure;
-} ubo;
-
-layout (location = 0) out vec2 outUV;
-layout (location = 1) out vec3 outN;
-layout (location = 2) out vec3 outV;//ViewDir
-layout (location = 3) out vec3 outWorldPos;
-
-out gl_PerVertex
-{
- vec4 gl_Position;
-};
-
-layout(push_constant) uniform PushConsts {
- mat4 model;
-} pc;
-
-void main()
-{
- outUV = inUV;
-
- mat4 mod = ubo.modelMatrix * pc.model;
- vec4 pos = mod * vec4(inPos.xyz, 1.0);
-
- //outN = normalize(transpose(inverse(mat3(mod))) * inNormal);
- outN = normalize(mat3(mod)* inNormal);
-
- mat4 viewInv = inverse(ubo.viewMatrix);
- outV = -(ubo.viewMatrix * pos).xyz;//normalize(vec3(viewInv * vec4(0.0, 0.0, 0.0, 1.0) - pos));
- outWorldPos = pos.xyz;
- gl_Position = ubo.projectionMatrix * ubo.viewMatrix * pos;
-}