File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
ogre_media/materials/glsl150 Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -19,23 +19,24 @@ uniform mat4 worldviewproj_matrix;
1919uniform vec4 size;
2020uniform 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+ // Use exactly these names to map onto gl_Color and gl_TexCoord used by fragment shaders
27+ out vec4 color;
28+ out vec2 TexCoord;
2829
2930layout (points) in ;
3031layout (triangle_strip, max_vertices= 4 ) out ;
3132
3233void emitVertex( vec3 pos_rel, vec3 tex )
3334{
3435 pos_rel = mat3 (inverse_worldview_matrix) * pos_rel;
35- vec4 pos = gl_in[0 ].gl_Position + vec4 (pos_rel,0.0 );
36+ vec4 pos = gl_in[0 ].gl_Position + vec4 (pos_rel, 0.0 );
3637 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 ) ;
38+ TexCoord = tex.xy;
39+ color = vdata [0 ].color ;
3940 EmitVertex();
4041}
4142
You can’t perform that action at this time.
0 commit comments