mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
* Added OpenTK preview * Bug fix * Cleanup * Initial Mesh preview support * Mesh preview support * Mesh preview - lighting and color
19 lines
400 B
GLSL
19 lines
400 B
GLSL
#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;
|
|
} |