SL-17274: Add vary_position, cleanup whitespace
parent
849e85dfd2
commit
415380b140
|
|
@ -31,6 +31,7 @@ out vec4 frag_data[3];
|
|||
#define frag_data gl_FragData
|
||||
#endif
|
||||
|
||||
VARYING vec3 vary_position;
|
||||
VARYING vec3 vary_normal;
|
||||
VARYING vec4 vertex_color;
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
uniform mat3 normal_matrix;
|
||||
uniform mat4 texture_matrix0;
|
||||
uniform mat4 modelview_matrix;
|
||||
uniform mat4 modelview_projection_matrix;
|
||||
|
||||
ATTRIBUTE vec3 position;
|
||||
|
|
@ -32,8 +33,8 @@ ATTRIBUTE vec4 diffuse_color;
|
|||
ATTRIBUTE vec3 normal;
|
||||
ATTRIBUTE vec2 texcoord0;
|
||||
|
||||
VARYING vec3 vary_position;
|
||||
VARYING vec3 vary_normal;
|
||||
|
||||
VARYING vec4 vertex_color;
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
|
|
@ -41,12 +42,13 @@ void passTextureIndex();
|
|||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
|
||||
passTextureIndex();
|
||||
vary_normal = normalize(normal_matrix * normal);
|
||||
|
||||
vertex_color = diffuse_color;
|
||||
//transform vertex
|
||||
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
|
||||
vary_position = (modelview_matrix * vec4(position.xyz,1.0)).xyz;
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
|
||||
passTextureIndex();
|
||||
vary_normal = normalize(normal_matrix * normal);
|
||||
|
||||
vertex_color = diffuse_color;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue