Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd rainbowy lighting/reflection on certain maps #5727

Open
WardenPotato opened this issue Feb 2, 2024 · 3 comments
Open

Odd rainbowy lighting/reflection on certain maps #5727

WardenPotato opened this issue Feb 2, 2024 · 3 comments
Labels
Platform: Linux The issue specifically occurs on Linux platforms.

Comments

@WardenPotato
Copy link

Details

Some maps for me have rainbowy reflections, im not sure why. Doesnt really seem to trigger unless i toggle the flashlight.

Flashlight on:
20240202203200_1

Flashlight off:
20240202203158_1

With a sandbox lamp spawned the behaviour can no longer be toggled:
zs_zedders_mall_f4_zz0007

Without ever having the flashlight on or a lamp spawned it doesnt happen:
zs_zedders_mall_f4_zz0008

Reproducability

Done with -noaddons -noworkshop and sandbox aswell.
Arch Linux, 64-Bit branch (AMD 7900XTX): 100%
Windows 10, 64-Bit branch (GTX 1070): 0% (Console errors do show)

Steps to reproduce

Run a Linux installation of gmod
Load this map and toggle the flashlight https://steamcommunity.com/sharedfiles/filedetails/?id=2186368179

@garryspins
Copy link

does it happen with your flashlight on when youre inside the map, not in the skybox/oob

@WardenPotato
Copy link
Author

Yeah it does

@chev2
Copy link

chev2 commented Feb 2, 2024

From my testing it seems the rainbow texture occurs when the map has no default/fallback cubemaps to use.

When compiling a map, VBSP will automatically patch materials that use env_cubemap, and replace $envmap to point to the appropriate VTF file, e.g. "$envmap" "maps/map_name/c-123_456_64". From my testing it seems these files are packed into the BSP when compiling the map, however they're left as empty black textures, likely "placeholder" cubemaps until the mapper runs buildcubemaps into console, which will then rewrite these placeholder cubemaps to contain actual proper textures.

I think if these coordinate VTF files are missing from the BSP file entirely, then it may or may not fallback to using materials/maps/map_name/cubemapdefault.vtf (might have to double-check this), and if that file isn't present, then it will fallback to weird behavior, such as rainbow colors under certain circumstances like using the flashlight.

The easiest way to fix this issue is to simply recompile the map, and ensure those VTF files are present under materials/maps/map_name/ using a tool like VIDE or GCFscape.

Edit: Upon further testing, it seems cubemapdefault.vtf is irrelevant when it comes to these rainbow textures appearing--the absence of the materials/maps/map_name/c-123_456_64 texture(s) is enough.

@robotboy655 robotboy655 added the Platform: Linux The issue specifically occurs on Linux platforms. label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Linux The issue specifically occurs on Linux platforms.
Projects
None yet
Development

No branches or pull requests

4 participants