codex-5.2: ресурсы

This commit is contained in:
2026-01-01 02:13:01 +06:00
parent d47a5cc090
commit 4aa7c6f41a
52 changed files with 5787 additions and 912 deletions

View File

@@ -16,25 +16,29 @@ layout(push_constant) uniform UniformBufferObject {
// struct NodeVertexStatic {
// uint32_t
// FX : 9, FY : 9, FZ : 9, // Позиция -224 ~ 288; 64 позиций в одной ноде, 7.5 метров в ряд
// N1 : 4, // Не занято
// LS : 1, // Масштаб карты освещения (1м/16 или 1м)
// Tex : 18, // Текстура
// N2 : 14, // Не занято
// TU : 16, TV : 16; // UV на текстуре
// FX : 11, FY : 11, N1 : 10, // Позиция, 64 позиции на метр, +3.5м запас
// FZ : 11, // Позиция
// LS : 1, // Масштаб карты освещения (1м/16 или 1м)
// Tex : 18, // Текстура
// N2 : 2, // Не занято
// TU : 16, TV : 16; // UV на текстуре
// };
void main()
{
uint fx = Vertex.x & 0x7ffu;
uint fy = (Vertex.x >> 11) & 0x7ffu;
uint fz = Vertex.y & 0x7ffu;
vec4 baseVec = ubo.model*vec4(
float(Vertex.x & 0x1ff) / 64.f - 3.5f,
float((Vertex.x >> 9) & 0x1ff) / 64.f - 3.5f,
float((Vertex.x >> 18) & 0x1ff) / 64.f - 3.5f,
float(fx) / 64.f - 3.5f,
float(fy) / 64.f - 3.5f,
float(fz) / 64.f - 3.5f,
1
);
Geometry.GeoPos = baseVec.xyz;
Geometry.Texture = Vertex.y & 0x3ffff;
Geometry.Texture = (Vertex.y >> 12) & 0x3ffffu;
Geometry.UV = vec2(
float(Vertex.z & 0xffff) / pow(2, 16),
float((Vertex.z >> 16) & 0xffff) / pow(2, 16)