mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-21 18:47:17 +02:00
* add WireframeMaterial from Qt 3D example * MaterialSwitcher now has 3 render modes: Solid, Wireframe, Textured * Remove NodeInstantiator; always create the material and modify entity's components (avoid rendering issues when switching between materials) * use DiffuseSpecularMaterial for Solid and Textured mode * create a MaterialSwitcher for all types of meshes (with/without textures) * add a render settings panel as part of 3D viewport overlay and remove "Textures" entry from outliner
21 lines
413 B
GLSL
21 lines
413 B
GLSL
#version 330 core
|
|
|
|
in vec3 vertexPosition;
|
|
in vec3 vertexNormal;
|
|
|
|
out EyeSpaceVertex {
|
|
vec3 position;
|
|
vec3 normal;
|
|
} vs_out;
|
|
|
|
uniform mat4 modelView;
|
|
uniform mat3 modelViewNormal;
|
|
uniform mat4 mvp;
|
|
|
|
void main()
|
|
{
|
|
vs_out.normal = normalize( modelViewNormal * vertexNormal );
|
|
vs_out.position = vec3( modelView * vec4( vertexPosition, 1.0 ) );
|
|
|
|
gl_Position = mvp * vec4( vertexPosition, 1.0 );
|
|
}
|