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
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
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.
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
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.
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
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
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.
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.
Too many places in the engine and the renderer expect texture names to
be insensitive: RAD files, material references, probably engine and game
calls too.
Make it universally case insensitive. Also, add rudimentary tests for
it.