With the depth prepass of the scene, the colour pass of the alpha tested
materials (default, normalmap, pbr, ...) doesn't write the depth the prepass
drew (keepdepth) and tested it without a bias. The prepass draws everything
a little farther (constant -1, slope -1), so a surface lying up to a pixel's
worth of the slope behind the front one passed as well, and the one drawn
last covered the other. Seen from the side a few metres away that is more
than a millimetre: the warning stickers 1 mm off the buffer beam of the EP07
(303e) vanished under the beam, drawn after them.
Those draws now test their depth with the bias of the prepass, nearer by two
units and 1/16 of the slope (the position is invariant in both programs).
The colour pass sets its bias in apply_draw_state() for the kept draws and
the decals together; the depth drawn inside the colour pass holds its own.
The OpenGL 4.6 renderer writes the depth in its colour pass and isn't
affected. No asset changes.
- opengl46water: the two passes of the snow join PROGRAM_NAMES and prepare_next() (#476), optional as before: one which doesn't
compile leaves the snow out (both passes) and the rain working; rain_cells.comp is made ahead too (its storage still waits for
the first rain), so the first rain doesn't compile it in the middle of a frame; program_count() counts it
- vulkan14indirect: the path of the materials with their own shadow program passes the pending flag of multidraw_program()
- opengl46renderer.h: staging's shader_prewarm kept with m_ownvertexprograms / m_materialshadowprograms
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
As in the OpenGL 4.6 renderer: Fetch_Shader() takes shaders/vk14/mat_<name>.vert when the file is there (the animals and
people animated by textures, mat_vat.vert), vertex.vert otherwise; the multi draw variant is made of the same one. Such a
material gets the programs of its sun shadows with it: its vertex shader with MATERIAL_SHADOW and (alpha)shadowmap.frag,
drawn with all its textures and its params, also from the gpu culling (the draws of one such material go together). The
cube maps of the lamps keep their programs, the depth prepass leaves these materials out (prepass class 0).
The scene block carries the rotation and the place of the camera of each sun cascade and headlight map (inv_view,
camera_hi, camera_lo, gl::set_camera_place()), and those of the view in the colour pass, so the shaders see a model in the
world the same way in every pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2