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.
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
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
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
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
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
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
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
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.