This is a huge change, and basically breaks everything (as per usual!) First of, this includes stuff like shaders so anything involving those are broken and then fixed. A new BuildAssets cmake file is added to aid in running AssetCompiler, and it seems to work fine on the engine base assets. The File API will eventually be revamped to handle this new way of organizing the files and domains will eventually be gotten rid of all together since I probably will replace it with game directory priorities. As it stands right now, there isn't a way to easily replace say - render_options.cfg with your own game-specific version. Apple builds are probably broken by this commit (since I'm moving around content and shader directories) to be fixed later.
25 lines
593 B
GLSL
25 lines
593 B
GLSL
layout (location = 0) out vec2 outUV;
|
|
|
|
layout(push_constant) uniform readonly PushConstant{
|
|
mat4 mvp;
|
|
vec4 color;
|
|
};
|
|
|
|
layout(std430, binding = 3) buffer readonly SceneInformation {
|
|
mat4 view;
|
|
};
|
|
|
|
void main() {
|
|
vec2 p = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
|
outUV = vec2(p.x, 1.0 - p.y);
|
|
|
|
p = p * 2.0f + -1.0f;
|
|
|
|
const vec3 right = {view[0][0], view[1][0], view[2][0]};
|
|
const vec3 up = {view[0][1], view[1][1], view[2][1]};
|
|
|
|
vec3 position = right * p.x * 0.25 + up * p.y * 0.25;
|
|
|
|
gl_Position = mvp * vec4(position, 1.0);
|
|
}
|
|
|