Kero Devlog #2 - July 2020

July 30, 2020

Progress Report

July brings a slew of (predominantly) visual improvements with a push towards getting all the rendering fundamentals there. Early lightmap support, translucency sorting as well as improved translucency shader support dominate visual changes, but other major enhancements add initial support for 3D skybox rendering.

Notable changes

  • $alpha shader parameter support

Previous translucency support was limited to the shader parameter$translucent; that parameter is really just a toggle that enables the diffuse texture’s alpha channel. This month brings support for $alpha. $alpha is a floating point parameter that applies a single alpha value (0.0-1.0) across the whole material.

The example above is a glass material with an $alpha of 0.9. Notice how you can now see the bsp being rendered behind.

There is still more to do on this; sorting is incomplete; and leads to props and displacements being skipped; probably solved by shuffling the render pass order for translucent materials.

  • 3D skybox rendering

This month brings with it 3D skybox rendering. BSP Geometry, displacement and staticprops are supported right now; dynamic entities are unsupported globally at present and so are of course not included.

Disregarding the rendering artifacts from the trees, de_dust2 now has skybox geometry

Most rendering configuration is unsupported; while scale is utilized, other valuable properties such as the various fog properties are not currently supported; shader effects are very low priority at present.

  • BSP Geometry lightmap loading

The big one; this month brings a Texture Atlas implementation, which in turn has led to (seemingly) successful lightmap data importing. This has been a huge challenge for me for almost 2 years; I’ve written multiple renderers and had several stabs at it but just couldn’t get it to behave before now.

Other noteworthy changes

  • Use info_player_start to set the initial camera transform, if the entity exists.
  • Add colour coding to console logs corresponding to severity
  • Texture Atlas implementation. While tailored towards lightmap usage, its quite reusable (note: find original author credit)