Commit Graph

19 Commits

Author SHA1 Message Date
Ivan Avdeev 7d6c12218f vk: comment on why we need inverse model matrix 2023-05-15 09:47:03 -07:00
Ivan Avdeev e54913f8af rt: improve prev frame bone matrix tracking for studio models
Still has some artifacts, but is generally rather close. Will look at
this again when caching studio model BLASes, as we'd be able to look at
them without extra animations.
2023-05-15 09:47:03 -07:00
Ivan Avdeev 091c61a45f vk: make sure studio model vertices are local space
TODO:
- revert not applying rotationmatrix in local vk_studio code
- make sure that prev_frame stuff hasn't changed
2023-05-15 09:47:03 -07:00
Ivan Avdeev e49f517dc0 vk: don't apply studio model matrix to vertices 2023-05-15 09:47:03 -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
Alibek Omarov 12dbfb467a ref: vk: studio: port optimized R_LightLambert function 2023-04-29 22:57:02 +03: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 a117338435 ref: vk: port to RefAPI 4 2023-04-28 17:34:05 +03:00
Ivan Avdeev 2db83a22a5 vk: profiler: add studio models count metric 2023-03-25 12:03:41 -07:00
Ivan Avdeev 9d8ec1bc9d vk: profiler: control profiler with r_speeds command
use bits to enable particular performance data display:
0 -- off
1 -- simple frame time
2 -- more object count and sizes statistics (TODO)
4 -- overall gpu usage (TODO)
8 -- extended intra-frame data, function times graph, etc
2023-03-21 11:59:57 -07:00
Ivan Avdeev 4f2eb7680b rt: propagate emissive color patches to kusochki
Fixes #330

Also, fix incorrect patch application introduced by previous commit, it
would not read the patch color value, and could only switch the light
off.
2023-03-02 23:23:31 -08:00
Ivan 'provod' Avdeev 8a457a17c2 rt: compute tangents for studio models
Enables applying normal maps to studio models.

Fixes #220, fixes #241
2023-03-01 10:47:31 -08:00
LifeKILLED f4b0f5016b vk rt: fix reprojection 2023-02-28 23:06:09 +04:00
Ivan 'provod' Avdeev 1fadbce860 vk: remove flag attribute in vertex
make color computation more uniform and not mode-specific
2023-02-25 18:38:22 -08:00
Ivan 'provod' Avdeev 9f72a804e0 vk: improve traditional blending universally
it is now almost on par with the gl renderer
2023-02-25 12:09:20 -08:00
Ivan 'provod' Avdeev ce27bdb1b1 vk: fix studio models being modulated by ent color 2023-02-24 23:57:49 -08:00
Ivan 'provod' Avdeev 005b7c84eb vk: pass model color explicitly
Instead of passing model color around as an implicit global state, pass it per-model.
This makes it (a) easier to track, (b) easy to fix blending issues. E.g. this fixes incorrect coloring of brush and studio models, which is also different.
2023-02-24 22:48:26 -08:00
Ivan 'provod' Avdeev 92b1e78d85 vk: make trad sprites more like gl ones
still not fully there:
- glow is slightly off
- TransAlpha has wrong blending mode

apparently pipeline settings for brushes, models, and sprites are substantially different, need different pipelines
2023-02-24 17:43:07 -08:00
Ivan Avdeev 053d26e870 move ref_vk to ref/vk 2023-02-16 10:30:31 -08:00