2018-10-03 05:52:35 +00:00
|
|
|
attribute vec4 vertex;
|
|
|
|
attribute vec3 normal;
|
|
|
|
attribute vec3 color;
|
|
|
|
attribute vec2 texCoord;
|
2018-10-04 12:51:01 +00:00
|
|
|
attribute float metalness;
|
|
|
|
attribute float roughness;
|
2018-10-03 05:52:35 +00:00
|
|
|
varying vec3 vert;
|
|
|
|
varying vec3 vertNormal;
|
|
|
|
varying vec3 vertColor;
|
|
|
|
varying vec2 vertTexCoord;
|
2018-10-04 12:51:01 +00:00
|
|
|
varying float vertMetalness;
|
|
|
|
varying float vertRoughness;
|
|
|
|
varying vec3 vertView;
|
2018-10-03 05:52:35 +00:00
|
|
|
uniform mat4 projMatrix;
|
|
|
|
uniform mat4 mvMatrix;
|
|
|
|
uniform mat3 normalMatrix;
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vert = vertex.xyz;
|
|
|
|
vertNormal = normalMatrix * normal;
|
|
|
|
vertColor = color;
|
|
|
|
vertTexCoord = texCoord;
|
|
|
|
gl_Position = projMatrix * mvMatrix * vertex;
|
|
|
|
}
|