Texturierung von Voxel Popoxel ermöglicht
This commit is contained in:
16
blight-assets/src/main/resources/Shaders/BakedTerrain.vert
Normal file
16
blight-assets/src/main/resources/Shaders/BakedTerrain.vert
Normal file
@@ -0,0 +1,16 @@
|
||||
uniform mat4 g_WorldViewProjectionMatrix;
|
||||
uniform mat4 g_WorldMatrix;
|
||||
|
||||
in vec3 inPosition;
|
||||
in vec3 inNormal;
|
||||
|
||||
out vec3 vWorldPos;
|
||||
out vec3 vNormal;
|
||||
|
||||
void main() {
|
||||
vec4 worldPos4 = g_WorldMatrix * vec4(inPosition, 1.0);
|
||||
mat3 worldMat3 = mat3(g_WorldMatrix);
|
||||
vWorldPos = worldPos4.xyz;
|
||||
vNormal = normalize(worldMat3 * inNormal);
|
||||
gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user