-
Notifications
You must be signed in to change notification settings - Fork 63
engine code requires some shaders and assets currently shipped as game assets #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Well, the engine also requires:
and they rely on some pixmaps. If it's an engine-required stuff, why not having them shipped built in the engine (the same way we did with glsl shaders)? Why not having the engine embedding a small dpk and activating a built-in vfs? Any idea anyone? |
note that:
can be modified like this:
to not rely on any external file. |
So what could be cool would be to embed those shaders in engine, we can give them explicit paths to be sure to not collide with existing game paks (like using a
I don't know what to do with the pixmap console font fallback ( |
So these are the current shaders required by engine:
The required files are:
Those are not required by game code neither the level editor, they are pure engine stuff. I think it's the exact same case with these shaders except dæmon is not aborting if they are missing, but it still does weird things without them. Basically, the engine is not complete without these shaders, and having to ship engine stuff in game packages looks weird. Similar job was done previously with glsl shaders that are now embedded. There is still that question about the |
Probably not. It's even more harmful than helpful. If the intent is to have a really light font embedded in engine, then png is a very bad format for the task, as it lacks many font-related data, which have to be guessed somehow by special weird code which implements a "freetype for the poor" thing. Removing that bigchars file would also allow to get rid of redundant code, that is even likely never executed, since when you have this file, then you also have unifont anyway. As for the solution... I guess using a .dpk for that would be pretty weird. What would be the benefits of a .dpk instead of just normal files sitting next to the engine (or in a specific directory, cleaner and more alike the unix way of organizing files)? |
|
Using a dpk would make sense if the files are intended to be overridable by the game/user. Otherwise it would probable be better to embed files directly, reusing the code for embedding GLSL. Unless adding code paths to access the embedded byte array (instead of opening a pak file) proved so burdensome that implementing an embedded DPK proved easier. |
Uh oh!
There was an error while loading. Please reload this page.
There are 3 shaders in engine code that are sets from game assets
The first one
gfx/2d/bigchars
looks to be a fallback if the ttf font is not found. Do we have to keep that? If the ttf found is not found it means both system font and game pack are missing, and if game pack is missing, the fallback will never be found. So, can we get rid of that?Daemon/src/engine/client/cl_main.cpp
Lines 3054 to 3069 in 8c1c497
The other ones are just shaders for pure white and pure black shaders:
https://github.com/UnvanquishedAssets/unvanquished_src.dpkdir/blob/8bd935eca289ab3e55ef21d6122eab884378fd6d/scripts/misc.shader#L106-L114
https://github.com/UnvanquishedAssets/unvanquished_src.dpkdir/blob/8bd935eca289ab3e55ef21d6122eab884378fd6d/scripts/misc.shader#L38-L45
The
white
one only relies on pure text, it can be embedded. Theconsole
one (black one) relies on a pure black textures, it can probably be generated at run time or we can probably embed a 1×1px xpm or something like that (it's currently a pure black 8×8 jpg)…Note that both
white
andconsole
shaders are redefined by the game code itself and game packages so they basically are fallbacks for when game code does not define them and when game packages are not there, so the purpose of fallback is entirely defeated: the fallback for missing game requires game packs (!!!).The text was updated successfully, but these errors were encountered: