Giter Club home page Giter Club logo

Comments (3)

zturtleman avatar zturtleman commented on June 3, 2024

Hmm, I want to change from saving content and surface flags in bsp to saving surfaceParms strings. After issue #50, engine could convert surfaceParms to correct content and surface flags for each game/mod. Allows map to have connect content/surface flags in all games/mods.

Possible way of doing this is new surfaceParms lump (num strings, strings). Then in bsp shaders set bits for which surfaceParms. Reusing contents / surface flag variable in bsp shaders struct would give us 64 bits (64 surfaceParms per-map). Hmm, is 64 unique surfaceParms strings per-map limit reasonable?

In q3map2 (assuming I counted correct..)
Q3 has 37
ET has 56
JA has 72 (though 32 are materials, unlikely to use them all in one map?...)

Maybe make bsp shader have variable length array allowing for more unique surfaceParms?


WIP idea. Add two new lumps. Strings lump (just a bunch of c-strings) and surfaceParms lump (bunch of indexes in strings lump). Then have dshader_t just point to the info in the new lumps, for less duplication and allowing more surfaceParms than anyone will ever need (INT_MAX - number of shader strings).

typedef struct {
    char        string[1];
} dtext_t;

// dstring_t index array
typedef struct {
    int     numStrings; // this is overkill, having more than 256 surfaceParms on one shader seems nuts...
    int     stringIndex[1]; // indexes in strings lump
} dsurfaceparms_t;

typedef struct {
    int         nameIndex; // string number in strings lump.
    int         surfaceParmsIndex; // number in surfaceParms lump that contains list of indexes in strings lump

    // should these be offsets so their easier to get to the data without parsing the whole text/surfaceParm lumps?
} dshader_t;

dfog_t could also use index in strings lump for shader name too, ya'know to save 60 bytes * numFogs in the BSP. (dealing with loading SBSP/IBSP would be more painful though...)

from spearmint.

zturtleman avatar zturtleman commented on June 3, 2024

TODO: look into this.

<Ensiform> really should do something about the patch grid stuff
<Ensiform> its one of the slowest parts on map load
<Ensiform> stiching
...
<Ensiform> > why cant this be done offline

from spearmint.

zturtleman avatar zturtleman commented on June 3, 2024

RBSP support was added, 0de8aa9. No light style support, yet. New BSP format is not something I plan to do soon.

from spearmint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.