Skip to content

Shadows on water surfaces#1965

Open
AdamTadeusz wants to merge 5 commits into
NeotokyoRebuild:masterfrom
AdamTadeusz:361_waterfogshadowsonsurface
Open

Shadows on water surfaces#1965
AdamTadeusz wants to merge 5 commits into
NeotokyoRebuild:masterfrom
AdamTadeusz:361_waterfogshadowsonsurface

Conversation

@AdamTadeusz
Copy link
Copy Markdown
Contributor

@AdamTadeusz AdamTadeusz commented May 17, 2026

Description

neo assets pr NeotokyoRebuild/neoAssets#120

Adds support for the $lightmapwaterfog water texture param used in games post l4d2. I wasn't able to get the scale to which the shadow is applied to the fog colour, so I made it depend on the alpha value of the water fog colour.

Keep in mind, water with this parameter needs to have a lightmap. Depending on the bsp compiler used, setting $lightmapwaterfog before compiling may be enough, or you may have to add a compiler flag like "%compileKeepLight". You can check if a water surface has a lightmap with the mat_luxels 1 command. If the surface is entirely filled in in blue, there is no lightmap. If instead you can see a square grid pattern corresponding to the lightmap resolution, the water has a lightmap.

Some example images
$lightmapwaterfog 0
image

$lightmapwaterfog 1 $fogcolor" "{52 49 44 0}
image

$lightmapwaterfog 1 $fogcolor" "{52 49 44 1}
image

Toolchain

  • Windows MSVC VS2022

@AdamTadeusz AdamTadeusz changed the title Shadows on water surface Shadows on water surfaces May 17, 2026
@AdamTadeusz AdamTadeusz marked this pull request as draft May 17, 2026 16:12
@AdamTadeusz AdamTadeusz added the Changes in neoAssets This PR depends on changes in the neoAssets repository. The relevant PR should be in the description label May 19, 2026
@AdamTadeusz AdamTadeusz marked this pull request as ready for review May 19, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes in neoAssets This PR depends on changes in the neoAssets repository. The relevant PR should be in the description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant