mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
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:
19
Unity Studio/vs.glsl
Normal file
19
Unity Studio/vs.glsl
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user