Skip to content

Commit

Permalink
Modernize billboard.geom
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Schmeisser authored Mar 25, 2022
1 parent 2dd1ccb commit af284a9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ogre_media/materials/glsl150/billboard.geom
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ uniform mat4 worldviewproj_matrix;
uniform vec4 size;
uniform vec4 auto_size;

in gl_PerVertex {
vec4 gl_Position;
vec4 gl_FrontColor;
} gl_in[];
in VertexData {
vec4 color;
} vdata[];

out vec4 gl_TexCoord[];
out vec4 color;
out vec2 texCoord;

layout(points) in;
layout(triangle_strip, max_vertices=4) out;
Expand All @@ -34,8 +34,8 @@ void emitVertex( vec3 pos_rel, vec3 tex )
pos_rel = mat3(inverse_worldview_matrix) * pos_rel;
vec4 pos = gl_in[0].gl_Position + vec4(pos_rel,0.0);
gl_Position = worldviewproj_matrix * pos;
gl_TexCoord[0] = vec4( tex.xy, 0.0, 0.0 );
gl_FrontColor = vec4( gl_in[0].gl_FrontColor );
texCoord = vec2( tex.xy );
color = vec4( vdata[0].color );
EmitVertex();
}

Expand Down

0 comments on commit af284a9

Please sign in to comment.