Commit Graph

720 Commits

Author SHA1 Message Date
Ivan Avdeev 4b605810f3
Merge pull request #713 from 0x4E69676874466F78/rad&patches
Update patches

Fix texture coordinates for monitors (c1a0, c1a1f)
2023-12-20 06:41:54 -08:00
Ivan Avdeev e33185c04c vk: update overall agenda a bit 2023-12-19 12:05:33 -05:00
Ivan Avdeev 239d7bc362 rt: try to clear temporal buffers on discontinuities once more
Found out that it wasn't really clearing anything.
Now it does call clear, but still there are temporal denoising
artifacts. The issue remains elusive.

Related: #661
2023-12-19 11:35:37 -05:00
Ivan Avdeev 7d7535c5c5 vk: improve logs around skybox loading 2023-12-19 10:18:57 -05:00
Ivan Avdeev d52d44e0ce vk: rt: restore skybox sampling for bounces 2023-12-19 10:06:28 -05:00
NightFox fc1a553bc7
Fix texture coordinates for monitors (c1a0, c1a1f) 2023-12-19 01:48:02 +03:00
Ivan Avdeev a0b36a4301 vk: trad: allow rendering with replaced PBR textures
Use `vk_use_material_textures` cvar to show new PBR material textures
for traditional rendering.
Note that they're often sampled in an incorrect colorspace, so they look
different from RT.

Fixes #711
2023-12-18 09:57:01 -08:00
Ivan Avdeev 7e0553d408
Merge pull request #708 from w23/stream-E346
Skybox improvements (E346-E349)

- [x] #706 
  - [x] Do not load skybox if map doesn't have any `SURF_DRAWSKY` surfaces.
  - [x] Cache: do not reload the same skybox.
  - [x] Enable loading packed KTX2 cubemaps as skyboxes in engine/imagelib
- [x] Reuse existing imagelib cubemap loading routines, remove custom skybox loading code
- [x] Allow hiding `SURF_DRAWSKY` surfaces via `"_xvk_remove_all_sky_surfaces" "1"`, #579 
- [x] #677 
  - [x] Add skybox exposure control for HDR skyboxes
  - [x] Allow reloading skyboxes when reloading patches
2023-12-18 09:56:04 -08:00
Ivan Avdeev bec1e0f558 vk: rt: add tunable skybox exposure
E.g. add `desert.mat` alongside `desert.ktx2` (or
`desrt_{rt,lf,...}.png` files) with the following contents:
```
exposure 0.3
```
Skybox texture color will be multiplied by this value.
2023-12-18 12:26:01 -05:00
Ivan Avdeev 356f7bdf71 imagelib: load KTX2 cubemaps directly 2023-12-18 11:37:46 -05:00
Ivan Avdeev 2776373652 imagelib: do not overwrite the correct image size when building cubemap
For some very unknown reason there's a line that fixes image size to
w*h*4, which would correspond to RGBA8 pixel format w/o alignment.

This is extremely incorrect for other pixel format, e.g. compressed
ones.

Not sure why this size-fixing was there, but removing it fixes sided
KTX2 compressed skybox corruption.
2023-12-15 09:14:23 -05:00
Ivan Avdeev b1b333f74a vk: use imagelib cubemap/skybox loader
Engine imagelib already has skybox loader. It uses rgbdata_t
IMAGE_CUBEMAP flag.
1. Support IMAGE_CUBEMAP
2. Utilize imagelib skybox loader, do not try to load individual skybox
   sides manually.

This will allow loading KTX2 cubemaps directly.

Known issues:
1. Compressed KTX2 sides are not rotated correctly. Engine/imagelib is
   unable to rotate compressed images.
2. Some KTX2 sides are corrupted. Cause unknown.
2023-12-14 13:40:34 -05:00
Ivan Avdeev 6a11c6e64f vk: rt: add notes regarding engine imagelib
Also:
- add more info to texture upload debug logs
- remove obsoleted code
- prepare for engine/imagelib-side cubemaps
2023-12-14 12:41:11 -05:00
Ivan Avdeev 6fc318143e vk: rt: allow hiding all SURF_DRAWSKY surfaces while retaining skybox
Neede for getting rid of some skybox 𝘱𝘦𝘯𝘦𝘵𝘳𝘢𝘵𝘪𝘰𝘯 glitches, see #579
2023-12-14 10:54:07 -05:00
Ivan Avdeev 3cbc11a8f0 vk: rt: optimize hires skybox loading
- Do not load skybox at all if there are no SURF_DRAWSKY, #706, #579
- Do not reload the same skybox, #706

Also refactor skybox loading a bit. Prepare for KTX2 skyboxes.
2023-12-14 10:33:26 -05:00
nilsoncore a06998321e vk: devmem: track peak single allocation size 2023-12-14 08:13:26 +03:00
nilsoncore cba1b02103 vk: devmem: print human-friendly memory size values
Raw values are still printed in subsequent messages.
2023-12-14 08:00:21 +03:00
nilsoncore ceb4437f8c vk: devmem: print number of alloc slots on overflow 2023-12-14 07:54:23 +03:00
nilsoncore 05ac770c81 vk: devmem: track alignment holes correctly
Get `alignment_hole` right from the `alolcator` instead of calculating
outside.
Improve allocation slot variable naming on slot allocation selection.
Restructure internal `vk_devmem_t` fields into `internal` struct.
Make `VK_DevMemUsageTypeString` visibility scope to file-only.
2023-12-14 07:50:15 +03:00
nilsoncore 1117c5969e vk: devmem: simplify flags formatting
Use `PRI_VKxxxFLAGS_FMT` as an inline format macro and
`PRI_VKxxxFLAGS_ARG( ... )` as an inline argument macro for that format.
Also bring back those `!!`.
2023-12-14 07:39:44 +03:00
Ivan Avdeev 9a0ff43a97
Merge pull request #707 from 0x4E69676874466F78/no_ray_warn
Improved warning when there are no ray extensions

fix #670
2023-12-12 14:42:44 -08:00
NightFox 726572b78c
minor reorganization 2023-12-13 01:13:48 +03:00
NightFox 0d3c9ba88d
Warning after getting a candidate 2023-12-12 19:46:04 +03:00
NightFox 852b7c28ba
Slight improvement of code 2023-12-12 14:56:35 +03:00
NightFox 1a9f97bb14
Added warnings about 32bit when configure 2023-12-12 14:31:20 +03:00
NightFox e1868c752f
Improved warning when there are no ray extensions
fix #670
2023-12-12 13:55:12 +03:00
Ivan Avdeev 5c42f34654 vk: rt: mark sky surfaces as non-geometry
SURF_SKY shouldn't receive any light, neither direct, nor indirect. Mark
it as non-geometry with ray length < 0.
2023-12-11 13:17:33 -05:00
Ivan Avdeev 4ac62076bb vk: use original texture for sprites in rasterization mode
Traditional rasterization should not use any of the patched textures.

Fixes #695
2023-12-11 12:55:32 -05:00
Ivan Avdeev c8123952a2 vk: rt: fix incorrect basecolor brdf multiplication
PBR model used implies the following rules:
- for metals both diffuse and specular components should be tinted by
  material base color.
- for dielectrics, only diffuse should be tinted, specular should remain
  as is.

Partially fixes #666
2023-12-11 11:48:44 -05:00
NightFox e89e44d94a
Add & update rad files
c2a4d.rad, c2a4e.rad, c2a4f.rad
2023-12-08 18:35:44 +03:00
NightFox b22d87ae82
Update c2a4a.rad
add missing +A~FIFTIES_LGT2
2023-12-07 18:54:40 +03:00
NightFox 20cbe33f2f
add c2a3e.patch 2023-12-07 17:12:21 +03:00
NightFox 1bec8ad9b9
Add new rad files 2023-12-07 17:11:55 +03:00
Ivan Avdeev 6cb45dda77 vk: update notes and todo 2023-12-05 12:59:30 -05:00
Ivan Avdeev e00f758594 vk: revert back indirect specular kernel size 2023-12-05 11:14:25 -05:00
NightFox 58572380ab
Update rad files 2023-12-05 17:11:26 +03:00
NightFox de3f350bb4
Update rad files
add missing ~LIGHT3B
2023-12-05 17:00:40 +03:00
NightFox 23c059baac
Update rad files 2023-12-05 16:32:30 +03:00
Ivan Avdeev eba28376d9
Merge pull request #686 from w23/stream-E341
Things done during stream E341

- [x] `vk/mod` in logs
- [x] fix NaNites, #685 
- [x] fix double switchable lights, #679
2023-12-04 11:01:14 -08:00
Ivan Avdeev f244aaaddf vk: update TODO 2023-12-04 13:57:06 -05:00
Ivan Avdeev 4fc6db36b4 vk: rt: fix adding switchable/animated light twice
Skip adding animated surfaces as static lights. We'd like them to be
static, but currently there's no distinction between immovable lights
and switchable lights or lights with dynamic emissive value.

Fixes #679
2023-12-04 13:48:12 -05:00
Ivan Avdeev 84f6d7d10b vk: rt: fix reading garbage values out of indirect spec bounds
Indirect specular and diffuse have half frame resolution.
Denoiser code was incorrectly reading past the valid range for indirect
specular values. This was sometimes giving visual glitches at frame
borders.

Fixes #685
2023-12-04 12:14:44 -05:00
Ivan Avdeev 0549822d53 vk: print 'vk/module' in logs 2023-12-04 11:29:38 -05:00
NightFox cdb1532979
Added new rad files
c2a* maps
2023-12-04 00:31:37 +03:00
Ivan Avdeev 4fd70777b7 vk: rt: increase max frame size gradually when needed 2023-12-01 10:55:58 -05:00
Ivan Avdeev 4d1b64bb19 vk: update TODO.md 2023-11-30 13:20:03 -05:00
Ivan Avdeev 605647aecc vk: rt: support changing screen resolution
Fixes #343
2023-11-30 13:01:40 -05:00
Ivan Avdeev bde036fc45 vk: find existing gpu scope with the same name
fixes #667
2023-11-30 11:57:15 -05:00
Ivan Avdeev 32f05816e1 vk: rt: extract dynamic polylight to brush model
They don't really belong to neither rt_model_t, nor render model.
Allows having dynamic polylights for func_water entities without "main"
render model, and only water submodels.
2023-11-30 11:20:32 -05:00
Ivan Avdeev c9b485f8a7
Merge pull request #671 from w23/stream-E338
Things committed during streams E338-E339

- [x] Allow patching rendermode for func_* entities, fixes #663
- [x] Print out screenshot timings
- [x] Unsuccessfully reset denoiser statistics on discontinuities
2023-11-30 08:09:07 -08:00
Ivan Avdeev 7417cfa06f vk: rt: try to clear denoiser statistics on frame discontinuities
Somehow doesn't fix the teleport/levelchange glitches, but still feels
like a step in the right direction.
2023-11-30 10:27:47 -05:00
Ivan Avdeev 73d320f51f vk: print how long it took to make a screenshot 2023-11-30 10:26:52 -05:00
Ivan Avdeev d5f8b593f9 vk: make rendermode patching a bit less ugly 2023-11-30 10:20:47 -05:00
NightFox 36a6e56ee1
Update rad files
add c2a1, c2a1a, c2a1b
2023-11-30 15:37:22 +03:00
Ivan Avdeev dd21e665b1 vk: patch rendermode for entities
Probably not the best way to do it, but this is an attempt.

Issue #663
2023-11-28 13:01:14 -05:00
Ivan Avdeev 735260a3c5 vk: brush: fixup per-model material mapping
fixes #669
2023-11-27 13:20:06 -05:00
Ivan Avdeev bbd96b3e0e vk: consolidate all bindings to the top of shaders
That way it is more clear what we declare, why and how.
2023-11-23 12:25:24 -05:00
Ivan Avdeev 016cdeaa6c vk: tools: speedup imagecompare 16x
Use -O3 -march=native
Save into tga, not png
2023-11-21 12:50:29 -05:00
Ivan Avdeev 2fbe477dd2 vk: renderscript: add arguments 2023-11-21 12:11:01 -05:00
Ivan Avdeev 2139b32f75 vk: rt: allow disabling temporal denoiser 2023-11-21 12:10:14 -05:00
Ivan Avdeev 036379707d vk: imagecompare: highlight with green the desired zero-difference image 2023-11-21 11:01:39 -05:00
Ivan Avdeev f11461772a vk: add rt_debug_fixed_random_seed cvar
Needed to pin random seed to a known value to make sure that frames are
reproducible for regression testing purposes.
2023-11-21 11:00:45 -05:00
Ivan Avdeev 4897f97726 vk: add rendertest maker script 2023-11-21 10:45:25 -05:00
Ivan Avdeev 1ac00a8792 vk: imagecompare: highlight total difference > 1% 2023-11-21 10:43:39 -05:00
Ivan Avdeev 27ed4b157a vk: rt: fixup `rt_debug_display_only lighting` 2023-11-21 10:27:58 -05:00
Ivan Avdeev 9953a47397 vk: add example rendertest script 2023-11-20 13:04:48 -05:00
Ivan Avdeev 4897da4f45 vk: document frame comparison effort 2023-11-20 13:02:21 -05:00
Ivan Avdeev 17267fd8c3 vk: tools: add imagecompare tool to compare screenshots
Produces diff image file and total difference.
2023-11-20 12:59:32 -05:00
NightFox 5a3912dcb0
update c2a5.patch
more smooth
2023-11-20 16:30:21 +03:00
NightFox 7e3e847b43
update patches
fix wagonchik texture coordinates and more correct textures/materials
other minor changes (I'd already forgotten)
2023-11-20 00:36:31 +03:00
NightFox acc103221a
add ba_security2.patch 2023-11-20 00:32:34 +03:00
NightFox e67232e4bf
update c1a0c.rad
fix ~LIGHT3F for c1a0c
2023-11-20 00:23:13 +03:00
Ivan Avdeev 16de17527a vk: document regression testing approaches
ref: #646
2023-11-17 12:29:53 -05:00
Ivan Avdeev f0b80887e8 vk: brush: support normalmaps for water surfaces
Adds missing tangents.

Fixes #655
2023-11-17 11:06:09 -05:00
Ivan Avdeev de80c0da64 vk: comment on no light under emissive acid
ref: #56
2023-11-17 10:22:53 -05:00
Ivan Avdeev 7d8d59d338
Merge pull request #653 from 0x4E69676874466F78/vulkan
Update patches&rads
2023-11-17 07:08:39 -08:00
NightFox 174d601ba6
add c1a4g.rad 2023-11-17 13:08:34 +03:00
Ivan Avdeev 9b18ffbc02 vk: update todo 2023-11-16 13:05:28 -05:00
Ivan Avdeev 85fbe15f65 vk: make conveyors move again
Known issues: validation-induced crash on changlevel

fixes #465
2023-11-16 13:00:00 -05:00
NightFox 8858433928
Update c0a0d.rad
temporary tune !TOXICGRN, !TOXICGRN2
2023-11-16 19:54:51 +03:00
NightFox c23404cfa1
Update patches
c0a0d: more smooth geometry
2023-11-16 19:53:26 +03:00
Ivan Avdeev 4def45125c vk: add `trihash` to `rt_debug_display_only` cvar 2023-11-16 10:55:05 -05:00
Ivan Avdeev dc1ea9cb44 vk: shaders: normalize noise.glsl indentation 2023-11-16 10:54:21 -05:00
Ivan Avdeev b21a8240ec vk: update todo 2023-11-16 10:43:51 -05:00
Ivan Avdeev f535020f94 vk: update emissive color for water surfaces
In a not super efficient way: it will re-upload kusochki every time,
even though there has been no update.
2023-11-16 10:35:07 -05:00
Ivan Avdeev e4d7858330 vk: add emissive water surfaces to polygon lights
Makes acid water surfaces emissive again.
However, they are not assinged proper emissive color values for direct
ray hits yet, so they do emit light, but look dar still.

Ref: #56
2023-11-16 09:56:21 -05:00
Ivan Avdeev a3c52a8001 vk: hide "back" water surfaces
Only leave water surfaces directed towards "air".
This is consistent with:
- non-`kRenderNormal` surfaces, for which there's only one surface present
- opt2 for translucent surfaces, where we aim to detect medium boundary
  direction based on normal-vs-ray-direction

Also add notes about translucent surfaces in general, more info about
water rendering under ref_gl, etc.

Fixes #264
2023-11-14 11:44:29 -05:00
Ivan Avdeev 78548960e7 vk: improve culling; add notes about water and culling
Cull everything except:
- opaque geometry: to avoid shadow and reflection holes
- bleded geometry: particles and such should be visible from any angle

Alpha-tested geometries result in visual glitches when not culled
(double-sided ladders, double shadows, etc). These glitches are worse
than slightly misaligned shadows.

Translucent geometries are still matter of research.
2023-11-13 12:22:23 -05:00
Ivan Avdeev d802404d1c vk: brush: investigate water surfaces orientation
Adds a few things:
- verbose logs about surface flags/type/orientation
- same about surface subdivided polys
- tries culling back water surfaces (doesn't work that well)
- tries culling in rt shaders

This still unfinished
2023-11-10 10:30:24 -05:00
Ivan Avdeev f6c19527d5 vk: brush: hide side water surfaces for entities w/o EF_WATERSIDES
Worldmodel draws all water surfaces regardless of their
orientation/PLANE_Z.

All other entities only draw sides when EF_WATERSIDES effect bit is set.
2023-11-09 12:55:56 -05:00
Ivan Avdeev 4145969198 vk: brush: do not try to invert water height when underwater
Not sure that we need it.
2023-11-09 10:49:53 -05:00
Ivan Avdeev 5c3be09161 vk: brush: force worldmodel alternate_anims textures static
Many static worldmodel surfaces still contain alternate texture chains.
That was making these surfaces dynamic, even though there's no way to
trigger these alternate anims.

Make worldmodel ignore alternate_anims when looking for animated
surfaces.

Fixes #644
2023-11-09 10:32:47 -05:00
NightFox 840d618e4d
Update patches
Minor changes (replacement by _xvk_tex_rotate)
2023-11-09 15:54:12 +03:00
Ivan Avdeev 3e9f6bc7a4 vk: half-fix water levels being too high
Pass current entity to compute wave height. Still doesn't switch to
negative height when underwater for some reason.
And still displays water sides.

Add some notes regarding water geometry generation and drawing.
2023-11-07 13:45:25 -05:00
Ivan Avdeev c575cb6cfd vk: add alternate_anim display to infotool 2023-11-07 13:45:06 -05:00
Ivan Avdeev 2c0e7033ed vk: fix crashing on maps with skybox
We were using a negative value for `SURF_SKY` surfaces, which hit an
assert on uploading kusochki.
2023-11-07 13:30:46 -05:00
Ivan Avdeev c6c58a9842 vk: allow rotating matrices in patches
Adds `_xvk_tex_rotate` field for surface patches. Angle is specified in
degrees.

Note that it rotates the texture around origin, which might be very far
away. So offset patching might be needed to re-align.
2023-11-07 12:03:40 -05:00
Ivan Avdeev 266f57e8a5 vk: make `vk_debug_log` a command, not a cvar
This makes it easily switchable at any point in time.

Still not sure how to properly manage log verbosity cvars:
- cvars are loaded after initialization and map load, so we can't really
  depend on saved cvar values.
- reloading cvars each frame cancels `-vkverboselogs` arg that is
  supposed to work around the above limitation
2023-11-07 11:59:12 -05:00
Ivan Avdeev 9eff6fa907 vk: list supported arguments for `rt_debug_display_only` 2023-11-07 10:32:35 -05:00
Ivan Avdeev a25bf841ac vk: fix bright artifacts coming from unpatched chrome materials
Fixes a typo that rewrote roughness value with garbage.

Also adds a few more debug channel displays for lighting phases. And
prints out available debug displays.

Fixes #641
2023-11-06 12:47:21 -05:00
Ivan Avdeev 4509e2075d vk: fix changing textures on buttons, etc
Detect changes in alternate_anims sequences.

Fixes #640
2023-11-06 11:42:07 -05:00
Ivan Avdeev f8c0baf78d vk: fixup -vkverboselogs, make it actually work 2023-11-06 11:07:58 -05:00
Ivan Avdeev dfcfd786a9 vk: fix material basecolor_map handling
- Do not replace inherited base color texture
- Do not acquire default base color texture

Fixes #638
2023-11-06 10:31:55 -05:00
NightFox fd356e6124
update c1a0c.patch 2023-11-06 00:00:17 +03:00
NightFox 6963c158a4
update c1a0c.patch 2023-11-05 23:43:12 +03:00
NightFox 42dfd56f87
update c1a1c.patch 2023-11-05 20:45:28 +03:00
NightFox 0927e25ce2
update patches
Improvement geometry smoothing (normals)
2023-11-04 19:23:21 +03:00
Ivan Avdeev 6e56c8c78d vk: add -vkverboselogs argument to enable super verbose logs at init 2023-11-03 13:23:10 -04:00
Ivan Avdeev a42e5051b7 vk: cleanup cvar prefixes
Now:
- Not necessarily vulkan-specific cvars are prefixed with `r_`
- Vulkan-specific but not RT-specific things are `vk_`
- RT-specific are `rt_`

Fixes #632
2023-11-03 13:15:11 -04:00
Ivan Avdeev 3a7d047f09 vk: add `surfhash` argument to `rt_debug_display_only`
Allows highlighting all the surfaces with random colors to easily see
the surfaces structure and boundaries.

Fixes #635
2023-11-03 12:05:36 -04:00
Ivan Avdeev 28eec97cbf vk: implement r_lightmap for both traditional and RT renderers
Display lightmap plus lighting for traditional.
Display all collected lights (including bounces and simple transparency)
for RT.

Fixes #634
2023-11-03 11:26:57 -04:00
Ivan Avdeev 0ba85e3f08 vk: add `rt_debug_display_only` cvar
Displays only the specified channel.

Fixes #631
2023-11-03 10:58:13 -04:00
Ivan Avdeev 2a3f48fd50 vk: fix occasional inverted normal maps
When texture coordinates are inverted, it makes tangent look into
oppsite direction, which inverts TBN and therefore normal map.

Make sure the tangent points to a consistent direction.

Fixes #627
2023-11-02 10:58:11 -07:00
Ivan Avdeev dfa240a4db vk: fix weird lines on suit studio model
It was using old pre-transform values for prev_verts, and that was
confusing temporal denoiser.

We should bone-transform vertices first, and only then store them as
prev_verts.

Fixes #585
2023-11-02 10:13:56 -07:00
Ivan Avdeev c869223690 vk: fix compilation after upstream merge 2023-11-02 11:46:30 -04:00
Ivan Avdeev 1f9b489bdc Merge remote-tracking branch 'upstream/master' into vulkan-upstream-merge-20231102 2023-11-02 11:31:59 -04:00
Alibek Omarov e481e1d73e ref: gl: enable GL waves with r_ripple 2023-10-31 21:52:00 +03:00
Alibek Omarov 6c0eed1b2b ref: gl: allow viewing water textures in their full glory with enabled r_ripple 2 2023-10-31 21:52:00 +03:00
Alibek Omarov a6c67fdf9f ref: gl: upload only part of texture we're using, i.e. 64x64 for 64x64, 128x128 for 128x128 2023-10-31 21:52:00 +03:00
Alibek Omarov 46889ed453 ref: gl: libc rand() does better job at randomizing 2023-10-31 21:52:00 +03:00
Alibek Omarov 882fcc152c ref: gl: always scale down texture to 64x64, like sw.dll does 2023-10-31 21:52:00 +03:00
Alibek Omarov a6af32dafd ref: gl: connect ripply water to others parts of renderer (init, reset, animation and rendering) 2023-10-31 21:52:00 +03:00
Alibek Omarov d6dfb83be7 ref: gl: ripply water implementation (bugfixed version from my Quake-2 patches) 2023-10-31 21:52:00 +03:00
Ivan Avdeev 6fda8bd977 vk: add a mechanism for exclusion of single surfaces from smoothing
Uses `_xvk_smoothing_excluded` field.

Surfaces can still be smoothed with a limited list of neightbours explicitly
by being included in a smoothing group.

Fixes #619
2023-10-31 09:55:06 -07:00
Ivan 'provod' Avdeev 5698746f42 vk: do not crash on corrupted scopes stack
This is not a valid reason to assert/crash, even though it is clearly a programming mistake.
If the stack is corrupted, just print its contents as an S_ERROR and continue.

Also:
- Fix the ultimate reason for stack being unbalanced for #604
- Do not analyze scopes when not needed, i.e. when `r_speeds` is zero.

Fixes #604
2023-10-31 09:13:47 -07:00
Ivan Avdeev a9df5cd86f
Merge branch 'vulkan' into texture-storage 2023-10-31 08:19:40 -07:00
Ivan Avdeev 737d1324e8 vk: assign translucent material mode to transparent studio models
fixes #613
2023-10-31 11:15:15 -04:00
Ivan Avdeev effbf3ea3d vk: fixup material lookup by texture name 2023-10-31 11:03:08 -04:00
Ivan Avdeev 36c06a514e vk: massage texture module a bit more 2023-10-31 10:48:14 -04:00
Ivan Avdeev 5962290b9d vk: simplify texture uploading failure cleanup 2023-10-31 10:43:12 -04:00
Ivan Avdeev 67f336b3c8 vk: load blue noise 3d texture from an array of png files 2023-10-31 09:44:06 -04:00
NightFox 6f40adab98 update rad files
Refactoring, performance improvement (more for c1a0b), minor changes
2023-10-31 05:30:46 -07:00
mittorn f2c080e736 gl2shim: fix broken matrix update when fog attribute enabled (32 bit shift overflow) 2023-10-30 22:34:34 +03:00
Ivan 'provod' Avdeev 23341c144c vk: fixup blue noise 3d texture refactoring
Fixed a bunch of validation and shader errors
2023-10-30 13:51:23 -04:00
Ivan Avdeev df3c0e30ba vk: convert blue noise texture to 3D
Note: not tested
2023-10-30 13:43:09 -04:00
Ivan Avdeev 1f043a90a6 vk: remove dummy textures for new material name resolution
Use dedicated hash table for new material names.
Updates a lot of dependent code:
- surface patches now target materials, not textures:
  `s/_xvk_textures/_xvk_material`
- patching now affects only materials, not texture ids. All logic that
  depends on texture ids now operate on original textures.
- brush normal smoothing now ignores patched surface materials when
  deciding whether two surfaces can be smoothed.

The rationale is that patching should only affect newer PBR/RT code paths.
2023-10-30 12:43:26 -04:00
Ivan Avdeev 8c37b25b31 vk: destroy textures on shutdown more explicitly 2023-10-30 10:44:57 -04:00
Ivan Avdeev 97a889cabb vk: fix missing skybox 2023-10-30 10:19:13 -04:00
Alibek Omarov ea55e78855 ref: _inline -> static 2023-10-29 23:38:43 +03:00
NightFox 114015c208 update patches 2023-10-29 11:40:06 -07:00
Alibek Omarov 30d1492b93 engine: remove Set/GetCurrentLoadingModel from RefAPI 2023-10-28 15:22:21 +03:00
Ivan Avdeev bc26e8150a vk: fixup mip auto generation 2023-10-27 10:50:46 -04:00
Ivan Avdeev 96864cf0bd vk: silence extra logs, add diagnostic checks 2023-10-27 10:41:39 -04:00
Ivan 'provod' Avdeev eab46bfe20 vk: fix unordered_roadmap windows compilation 2023-10-27 10:18:48 -04:00
Ivan Avdeev ef65ba56ba vk: fix textures leaking at shutdown; add hash table stats 2023-10-27 10:12:34 -04:00
Ivan Avdeev 7d53458ea3 vk: track all ref_interface texture access as a single refcount ref
Legacy ref_interface_t texture access is not refcountable. It does
create/destroy texture in a single call regardless of other users.
Track it with a separate flag that affects refcount with a single +1/-1.
2023-10-27 09:33:01 -04:00
Ivan 'provod' Avdeev bf9ca596eb vk: fix windows build
Windows lacks strcasestr, use Q_stristr
2023-10-27 09:05:53 -04:00
mittorn bf5fd40d64 gl2shim: workaround empty rgb5/rgb8 textures 2023-10-26 23:08:02 +03:00
mittorn 6bc613bdb4 ref_gl: force gles2 on non-nanogl until we support gles1 directly 2023-10-26 23:07:39 +03:00
mittorn a982562658 ref_gl: Fix missing DebugOutput functions on GLES 2023-10-26 23:07:22 +03:00