Entity positions.

This commit is contained in:
2025-03-02 12:57:20 -06:00
parent 6c3305be10
commit c8abdcb82e
16 changed files with 175 additions and 31 deletions

View File

@ -0,0 +1,8 @@
// Copyright (c) 2025 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
uint packedGetU8(uint position, uint data) {
return (data >> (position * 8u)) & 0xFFu;
}

View File

@ -1,32 +0,0 @@
// Copyright (c) 2025 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "../../../../dusk/display/displaydefs.h"
struct Transform {
mat4 projection;
mat4 view;
vec2 resolution;
};
layout(std140) uniform b_Transforms {
Transform transforms;
};
vec2 transformDisplayGetSize() {
return vec2(SCREEN_WIDTH, SCREEN_HEIGHT);
}
float transformDisplayGetAspectRatio() {
return (float(SCREEN_WIDTH) / float(SCREEN_HEIGHT));
}
vec2 transformResolutionGetSize() {
return transforms.resolution;
}
float transformResolutionGetAspectRatio() {
return (transforms.resolution.x / transforms.resolution.y);
}