Ivan Avdeev
babfbb08ab
vk: improve mvp matrix handling a bit
2023-05-04 11:10:22 -07:00
Ivan Avdeev
4f43b316a6
rt: material: print fauly lines on unknown keys
2023-05-04 11:10:22 -07:00
Ivan Avdeev
481aa651c6
vk: refactor passing m,v,p matrices around
...
View and projection now set only once in a logical place.
Model matrix is now closely associated with its model, and not stored as
a global state.
2023-05-04 11:10:22 -07:00
Ivan Avdeev
0b6ef9fd65
vk: remove a couple unused things from vk_render draw structs
2023-05-04 11:10:22 -07:00
Ivan 'provod' Avdeev
58433a2221
rt: only load textures for potentially usable materials
...
Skip loading textures for materials which are not going to be used.
2023-05-04 11:10:22 -07:00
Ivan Avdeev
2dcc5073aa
ci: disable nswitch and psvita targets
...
We're not doing anything relevant to them in the vulkan branch, and
all they do is take extra time for CI to complete
2023-05-01 17:03:22 -07:00
Ivan Avdeev
528a715c76
ci: disable upload step as unnecessary for vulkan branch
2023-05-01 17:03:22 -07:00
Ivan Avdeev
3affb12574
ci: try re-enabling `build` dependency
...
Let's see whether that fixes constant failure in upload
2023-05-01 17:03:22 -07:00
Ivan 'provod' Avdeev
1cfb183cbd
rt: extract per-model data from kusochki
2023-05-01 17:03:22 -07:00
Ivan Avdeev
0d8a7f76f5
Merge pull request #529 from w23/E260
...
- [x] Improves #528 a bit
- [x] Fixes #523
- [x] Fix ![image](https://user-images.githubusercontent.com/321361/235242886-bbae06cf-4375-4e11-bae0-8bc4e7644d59.png )
- [ ] ~верни зеркало! ![image](https://user-images.githubusercontent.com/321361/235250971-6652e2b2-e531-4b41-b603-1c50306b7ea3.png )~
- [x] test_brush2 лесенки пропали на растеризации
2023-05-01 10:45:31 -07:00
Ivan Avdeev
54d909b715
vk: make sure blending is the same as for gl for brush models
...
Essentially just copy R_SetRenderMode() logic to vk_brush
2023-05-01 10:27:30 -07:00
Ivan Avdeev
209bf1faa2
Merge pull request #525 from a1batross/vulkan
...
Sync with upstream
♥️ @a1batross
2023-04-30 21:46:38 -07:00
Alibek Omarov
6cc3832582
ci: fix incorrectly commented out build
...
Co-authored-by: Ivan Avdeev <lists@provod.works>
2023-04-29 22:58:03 +03:00
Alibek Omarov
12dbfb467a
ref: vk: studio: port optimized R_LightLambert function
2023-04-29 22:57:02 +03:00
Ivan Avdeev
b93ef2e52c
vk: fix freeing NULL bmodel memory
2023-04-28 13:29:02 -07:00
Ivan 'provod' Avdeev
e1d250e8da
vk: split geometries into static and animated
...
Load geometries only once, and then update only those which have animated textures.
Fixes #523
2023-04-28 12:35:48 -07:00
Ivan 'provod' Avdeev
f722f38617
vk: infotool: mark ent index as dynamic
2023-04-28 11:31:41 -07:00
Ivan 'provod' Avdeev
52f99ec329
rt: only upload kusochki when needed
...
- Once at load
- When color/mode/prevxform changed
Breaks animated textures.
#523
2023-04-28 11:19:57 -07:00
Ivan Avdeev
b17c00654b
vk: silence a couple NOT IMPLEMENTED messages
...
- We're not going to implement R_ShowTextures for ref_vk, at least in
its gl form.
- It seems that Mod_GetCurrentVis() can just return NULL, at least
ref_soft does it.
Fixes #269 , fixes #254
2023-04-28 10:32:01 -07:00
Ivan Avdeev
3447dfc5d6
rt: linearize alpha value for blending
...
This makes transparent brushes look more correct. But also makes sprites
look a bit dull.
Fixes #528
2023-04-28 10:12:15 -07:00
Alibek Omarov
62590dd2a9
ref: vk: use safe string functions, as unsafe versions were removed from libpublic
2023-04-28 17:43:50 +03:00
Alibek Omarov
e5e2a63ba2
ref: vk: fix matrix4x4_identity to m_matrix4x4_identity which conflicts in Vita port
2023-04-28 17:43:01 +03:00
Alibek Omarov
a117338435
ref: vk: port to RefAPI 4
2023-04-28 17:34:05 +03:00
Alibek Omarov
d75dcd358e
public: restore unused, removed in upstream Matrix4x4_SetOrigin. Actually used in Vulkan fork
2023-04-28 17:33:23 +03:00
Alibek Omarov
c4757058e1
Merge upstream master
2023-04-28 17:15:31 +03:00
Alibek Omarov
cb3b16e2ec
engine: client: implement v_dark in engine, instead of making it ref-specific
2023-04-28 16:52:22 +03:00
Alibek Omarov
bd3dc71f39
engine: server: refactor banid, explicitly does not allow ban using userid for now
2023-04-28 16:24:41 +03:00
Ivan Avdeev
8ac1a76259
rt: rename traceAdditive to traceSimpleBlending
...
This is to more clearly distinguish between simple blended things that
don't participate in lighting, and future more involved blending with
refraction and being affected by light
2023-04-27 10:59:38 -07:00
Ivan Avdeev
847777fb6b
rt: do not forget to clear scratch buffer before loading new map
...
Fixes rare random crashes when loading maps with many models in it.
2023-04-27 10:59:38 -07:00
Ivan Avdeev
0b8b5b571b
rt: sort transparent geometry ray hits
...
Limit to 8 layer for now. Seems to be working just fine.
VGPR usage and performance impact will be checked later.
2023-04-27 10:59:38 -07:00
Ivan Avdeev
b79a65f8a1
rt: fixup incorrect oit application
...
Still doesn't work for us, as we also have purely emissive/additive
polygons. wOIT doesn't seem to support that fundamentally, each surface
should still attenuate the background.
Didn't even get to the _weighted_ part of it because of that.
2023-04-27 10:59:38 -07:00
Ivan Avdeev
449bcc4db9
rt: fixup blending emissive in background
2023-04-27 10:59:38 -07:00
Ivan Avdeev
ae510dd3ff
rt: use kusok.model.color
...
Fixes blending differences in test_brush/test_sprite maps. They now look
fairly similar (modulo color correction).
OIT is still a bit off, but good enough for now
2023-04-27 10:59:38 -07:00
Ivan 'provod' Avdeev
d6a41bc041
rt: try weighted oit
...
Known issues:
- test_brush blend modes are broken
- emissive does not participate in weighted oit properly
2023-04-27 10:59:38 -07:00
Ivan 'provod' Avdeev
d576818550
rt: implement mix blending with undefined order
...
Known issues:
- apparently BLEND_MIX surfaces should also participate in lighting. Figure out how.
- sensitive to ray tracing order. Need proper OIT (or hacks)
2023-04-27 10:59:38 -07:00
Ivan 'provod' Avdeev
3800d6559e
rt: restore glow
...
This required uploaded kusochki only later during frame time, just before rendering the model. Otherwise they would get incorrect rendermode.
Also add blend mode debug colors.
2023-04-27 10:59:38 -07:00
Ivan 'provod' Avdeev
1ebc1d207c
rt: commoditize setting material mode
...
Known issues:
- Breaks sprite glow for some reason.
2023-04-27 10:59:38 -07:00
Ivan 'provod' Avdeev
5b370509fe
rt: group Material and ModelMetadata in Kusok
...
They have mismatching frequencies. ModelMetadata should be per-Model, there should be only a few dozen of these.
There maybe hundreds (or even thousands) of materials, but one material can be still referenced by many kusochki.
This only moves fields into new structs, which still belong to Kusok. The real extraction will happen later, see #52 .
2023-04-27 10:59:38 -07:00
Alibek Omarov
48176233bd
public: move FOV calculating functions out of libpublic, as they are very specific to engine view
2023-04-26 05:22:34 +03:00
Alibek Omarov
a292d2fd53
platform: win32: replace Q_sprintf calls by Q_snprintf
2023-04-26 05:20:45 +03:00
Alibek Omarov
27aad9f4a0
ref: gl: add size argument to COM_Default/ReplaceExtension calls
2023-04-26 05:20:45 +03:00
Alibek Omarov
71a3cedba8
filesystem: add size argument to COM_Default/ReplaceExtension calls
2023-04-26 05:20:45 +03:00
Alibek Omarov
ec2951cf45
engine: add size argument to COM_Default/ReplaceExtension calls
2023-04-26 05:20:45 +03:00
Alibek Omarov
ff436ae100
public: crtlib: add safe COM_DefaultExtension and COM_ReplaceExtension
2023-04-26 05:20:45 +03:00
Alibek Omarov
cfdfdd5c93
utils: mdldec: add size argument to COM_FileBase calls
2023-04-26 05:20:45 +03:00
Alibek Omarov
8b96e7ca87
ref: add size argument to COM_FileBase calls
2023-04-26 05:20:45 +03:00
Alibek Omarov
1603b8028c
filesystem: add size argument to COM_FileBase calls
2023-04-26 05:20:45 +03:00
Alibek Omarov
8c7db8499f
engine: add size argument to COM_FileBase calls
2023-04-26 05:20:45 +03:00
Alibek Omarov
fbdd79644b
public: test new COM_FileBase and compare it's results with old implementation (embedded into test itself)
2023-04-26 05:20:45 +03:00
Alibek Omarov
ac39090f6e
public: crtlib: add safe COM_FileBase implementation
2023-04-26 05:20:45 +03:00