#version 330 core

layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aN;

out vec3 vWorldPos;
out vec3 vWorldNormal;

uniform mat4 uMVP;
uniform vec3 uRoomHalfSize;

void main() {
    // 把单位立方体 [-1,1] 缩放成房间大小
    vec3 world = aPos * uRoomHalfSize;
    vWorldPos = world;
    vWorldNormal = aN;
    gl_Position = uMVP * vec4(world, 1.0);
}

