Skip to content

Commit af284a9

Browse files
author
Simon Schmeisser
authored
Modernize billboard.geom
1 parent 2dd1ccb commit af284a9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ogre_media/materials/glsl150/billboard.geom

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ uniform mat4 worldviewproj_matrix;
1919
uniform vec4 size;
2020
uniform vec4 auto_size;
2121

22-
in gl_PerVertex {
23-
vec4 gl_Position;
24-
vec4 gl_FrontColor;
25-
} gl_in[];
22+
in VertexData {
23+
vec4 color;
24+
} vdata[];
2625

27-
out vec4 gl_TexCoord[];
26+
out vec4 color;
27+
out vec2 texCoord;
2828

2929
layout(points) in;
3030
layout(triangle_strip, max_vertices=4) out;
@@ -34,8 +34,8 @@ void emitVertex( vec3 pos_rel, vec3 tex )
3434
pos_rel = mat3(inverse_worldview_matrix) * pos_rel;
3535
vec4 pos = gl_in[0].gl_Position + vec4(pos_rel,0.0);
3636
gl_Position = worldviewproj_matrix * pos;
37-
gl_TexCoord[0] = vec4( tex.xy, 0.0, 0.0 );
38-
gl_FrontColor = vec4( gl_in[0].gl_FrontColor );
37+
texCoord = vec2( tex.xy );
38+
color = vec4( vdata[0].color );
3939
EmitVertex();
4040
}
4141

0 commit comments

Comments
 (0)