Comments (5)
rogue
ships with basically copies of all the menu images in pics/
. Since "game" files have precedence over "base" files, those "old" graphics shipped with rogue
are used.
The idea is because games/mods typically ship graphics that differ from the original ones their versions should be preferred.
FWIW, for material images (wall textures, skins) there exists a mechanism to detect this case (game ships copy that is unmodified from base game) and "ignore" the game file in that case. That has not been adapted for UI images, but probably could.
from q2rtx.
Relevant code for material image "unmodified copy" handling:
Q2RTX/src/refresh/vkpt/material.c
Line 773 in a50fe35
Q2RTX/src/refresh/vkpt/material.c
Line 844 in a50fe35
from q2rtx.
Thanks. At first glance I see that it is by design:
Q2RTX/src/refresh/vkpt/material.c
Line 846 in a50fe35
However, this comment says differently:
Q2RTX/src/refresh/vkpt/material.c
Line 778 in a50fe35
If it is by design it is better not to change its behavior. But I still find it confusing. Can't we at least make an exception for the menu items (m_banner* and m_main*)?
from q2rtx.
First off, be aware that this applies to material images only. Menu images will not go through that code path!
To deal with menu images the idea would have to be adapted somehow, also probably move to a more general place (images.c
, probably).
FWIW, the behavior for material images is somewhat complicated because it has to cover a number of cases...
- There are material definitions (consider them appearance options for RTX mode) for a lot of skins and wall textures in the base game (
baseq2
). They're assumed to look "better" than the defaultpcx
orwal
files, so use them. - However, if you're using another game/mod/mission pack, and they replace a skin or wall texture, the replaced version should be used; otherwise, the appearance wouldn't be right with the explicit material definition, so don't use that.
- But, there is the special case where eg rogue and xatrix ship identical copies of baseq2 skins & wall textures. If we just follow the logic of 2. above, that'd mean the lower-quality
pcx
orwal
files would be used, despite the material definition being viable and preferable in this case - so that's what's done.game_image_identical_to_base()
is used for that.
Did this clarify things for you?
I actually coded a somewhat more generic version of the "identical image" approach earlier: res2k@199eb4d
However, if I remember right, I went with the more focused "material system only" approach b/c "hiding" the redundant files at filesystem level may have weird consequences/cause unexpected behavior when applied to files other than images.
The suggestion above - move the "identical image detection" to the image loading code in images.c
- could be more appropriate "middle way".
from q2rtx.
Thanks for the explanation.
I'll look into it. However, this is a steep learning curve for me: new to the project and new to C (Python and C# programmer).
from q2rtx.
Related Issues (20)
- Increased noise with Spherical Triangle Sampling (commit #266) HOT 7
- Crash when starting a game or loading save save (Windows/Linux) HOT 5
- wrong flashlight direction when playing demo HOT 7
- reset accumulated profiler samples causes an access violation error HOT 5
- Support for Quake 2 remaster, please ? HOT 21
- Errors trying to build latest Q2RTX HOT 6
- No Audio on default build from Ubuntu.. HOT 2
- [Question] Where could I find the default game lib logic of d2rtxded loading? HOT 1
- [Feature Request] Support compilation against shared system libs HOT 2
- There are no shadows in the latest(1.7.0) render version. HOT 2
- [regresssion] Graphic does not render correctly HOT 6
- Weapon renders into BSP surfaces when offset clipping isn't enough. HOT 12
- Parallax Occlusion Mapping with Self-Shadowing ? HOT 2
- Input from cinematics gets into the game HOT 3
- "Pitch black" rendering HOT 5
- Enable FSR3 HOT 2
- Native wayland small viewport & stretched graphics HOT 1
- CMake error: Unknown CHECK_C_COMPILER_FLAG
- Failed to compile client target due to missing libm linkage
- [Question] What is the minimal supported GCC?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from q2rtx.