Mesh Preview Support (#26)

* Added OpenTK preview

* Bug fix

* Cleanup

* Initial Mesh preview support

* Mesh preview support

* Mesh preview - lighting and color
This commit is contained in:
ordigdug
2017-02-25 05:04:05 -05:00
committed by Perfare
parent b4bce77381
commit 384dd2e4e3
10 changed files with 599 additions and 95 deletions

19
Unity Studio/vs.glsl Normal file
View File

@ -0,0 +1,19 @@
#version 140
in vec3 vertexPosition;
in vec3 normalDirection;
in vec4 vertexColor;
uniform mat4 viewMatrix;
out vec3 surfaceNormal;
out vec3 toLightVector;
out vec4 color;
void main()
{
vec3 lightPosition = vec3(200.0, 200.0, 200.0);
gl_Position = viewMatrix * vec4(vertexPosition, 1.0);
surfaceNormal = normalDirection;
toLightVector = lightPosition - vertexPosition;
color = vertexColor;
}