diff --git a/src/main/resources/graphics/scenery/backends/shaders/Line.geom b/src/main/resources/graphics/scenery/backends/shaders/Line.geom index 9e44dc16b..68b5a1dda 100644 --- a/src/main/resources/graphics/scenery/backends/shaders/Line.geom +++ b/src/main/resources/graphics/scenery/backends/shaders/Line.geom @@ -38,9 +38,6 @@ layout(push_constant) uniform currentEye_t { } currentEye; void main() { - //vec3 p1 = VertexIn[0].Position.xyz / VertexIn[0].Position.w; - //vec3 p2 = VertexIn[1].Position.xyz / VertexIn[1].Position.w; - vec3 p1 = gl_in[0].gl_Position.xyz / gl_in[0].gl_Position.w; vec3 p2 = gl_in[1].gl_Position.xyz / gl_in[1].gl_Position.w; diff --git a/src/main/resources/graphics/scenery/backends/shaders/Line.geom.spv b/src/main/resources/graphics/scenery/backends/shaders/Line.geom.spv index a2f0b1190..efd54b246 100644 Binary files a/src/main/resources/graphics/scenery/backends/shaders/Line.geom.spv and b/src/main/resources/graphics/scenery/backends/shaders/Line.geom.spv differ diff --git a/src/main/resources/graphics/scenery/backends/shaders/Line.vert.spv b/src/main/resources/graphics/scenery/backends/shaders/Line.vert.spv index f9363007f..1e4aae19a 100644 Binary files a/src/main/resources/graphics/scenery/backends/shaders/Line.vert.spv and b/src/main/resources/graphics/scenery/backends/shaders/Line.vert.spv differ diff --git a/src/main/resources/graphics/scenery/backends/shaders/LinePair.geom b/src/main/resources/graphics/scenery/backends/shaders/LinePair.geom index b8a25b90e..919147ecc 100644 --- a/src/main/resources/graphics/scenery/backends/shaders/LinePair.geom +++ b/src/main/resources/graphics/scenery/backends/shaders/LinePair.geom @@ -24,7 +24,7 @@ layout(set = 1, binding = 0) uniform LightParameters { }; -layout(set = 4, binding = 0) uniform ShaderProperties { +layout(set = 3, binding = 0) uniform ShaderProperties { vec4 startColor; vec4 endColor; vec4 lineColor; @@ -39,8 +39,8 @@ layout(push_constant) uniform currentEye_t { } currentEye; void main() { - vec3 p1 = VertexIn[0].Position.xyz / VertexIn[0].Position.w; - vec3 p2 = VertexIn[1].Position.xyz / VertexIn[1].Position.w; + vec3 p1 = gl_in[0].gl_Position.xyz / gl_in[0].gl_Position.w; + vec3 p2 = gl_in[1].gl_Position.xyz / gl_in[1].gl_Position.w; // tangent vec2 t = normalize(p1.xy - p2.xy); @@ -74,13 +74,13 @@ void main() { gl_Position = c; Vertex.Position = gl_Position.xyz; Vertex.Normal = N; - Vertex.Color = VertexIn[0].Color; + Vertex.Color = VertexIn[1].Color; EmitVertex(); gl_Position = d; Vertex.Position = gl_Position.xyz; Vertex.Normal = N; - Vertex.Color = VertexIn[0].Color; + Vertex.Color = VertexIn[1].Color; EmitVertex(); EndPrimitive(); diff --git a/src/main/resources/graphics/scenery/backends/shaders/LinePair.geom.spv b/src/main/resources/graphics/scenery/backends/shaders/LinePair.geom.spv index 689736f6a..94f0402ab 100644 Binary files a/src/main/resources/graphics/scenery/backends/shaders/LinePair.geom.spv and b/src/main/resources/graphics/scenery/backends/shaders/LinePair.geom.spv differ diff --git a/src/main/resources/graphics/scenery/backends/shaders/LinePair.vert b/src/main/resources/graphics/scenery/backends/shaders/LinePair.vert index b9bf09d83..a043a44d8 100644 --- a/src/main/resources/graphics/scenery/backends/shaders/LinePair.vert +++ b/src/main/resources/graphics/scenery/backends/shaders/LinePair.vert @@ -34,7 +34,7 @@ layout(set = 2, binding = 0) uniform Matrices { int isBillboard; } ubo; -layout(set = 4, binding = 0) uniform ShaderProperties { +layout(set = 3, binding = 0) uniform ShaderProperties { vec4 startColor; vec4 endColor; vec4 lineColor; diff --git a/src/main/resources/graphics/scenery/backends/shaders/LinePair.vert.spv b/src/main/resources/graphics/scenery/backends/shaders/LinePair.vert.spv index 5bea7ecbe..407b25d34 100644 Binary files a/src/main/resources/graphics/scenery/backends/shaders/LinePair.vert.spv and b/src/main/resources/graphics/scenery/backends/shaders/LinePair.vert.spv differ diff --git a/src/main/resources/graphics/scenery/backends/shaders/LinePairForward.frag b/src/main/resources/graphics/scenery/backends/shaders/LinePairForward.frag index 8ea70b2e0..8b9f11022 100644 --- a/src/main/resources/graphics/scenery/backends/shaders/LinePairForward.frag +++ b/src/main/resources/graphics/scenery/backends/shaders/LinePairForward.frag @@ -33,10 +33,10 @@ const int MATERIAL_HAS_SPECULAR = 0x0004; const int MATERIAL_HAS_NORMAL = 0x0008; const int MATERIAL_HAS_ALPHAMASK = 0x0010; -layout(set = 3, binding = 0) uniform MaterialProperties { +/*layout(set = 3, binding = 0) uniform MaterialProperties { int materialType; MaterialInfo Material; -}; +};*/ layout(set = 4, binding = 0) uniform ShaderProperties { vec4 startColor;