Skip to content

Commit

Permalink
changed LinePair shader Set of properties from 4 to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerOfNames authored and ctrueden committed Jun 14, 2023
1 parent 83f9595 commit bd1585f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bd1585f

Please sign in to comment.