Skip to content

Optimizar vertices #15

Description

@RubyEnoshima

void Chunk2::afegirVertex(vector<GLbyte>& vertices, int8_t x, int8_t y, int8_t z, uint8_t tipus, bool u, bool v, uint8_t llum) {
// Posicio
vertices.push_back(x);
vertices.push_back(y);
vertices.push_back(z);
// Color
//vertices.push_back(r);
//vertices.push_back(g);
//vertices.push_back(b);
// Quantitat de llum
vertices.push_back(llum);
// Coordenades de textura
vertices.push_back(u);
vertices.push_back(v);
// Tipus (posició del mapa de textures)
vertices.push_back(tipus%16);
vertices.push_back(tipus/16);
}

Claramente, tanto aqui como en el shader usamos demasiado espacio

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions