-
Notifications
You must be signed in to change notification settings - Fork 169
Projected textures
A projected texture is a projection of a texture, projecting it onto surfaces and (optionally) casting dynamic shadows. It's normally used to cast dynamic light and is also what the player's flashlight uses. Mappers can place their own projected textures via the "env_projectedtexture" entity. This entity is already available in most Source games, but only one could be active at the time (including the player's flashlight) and it suffered from several bugs in earlier branches of the engine, including Source 2013.
In Mapbase, projected textures have been overhauled to make them more stable, more flexible, and more usable. Most of the bugs they suffered from in Source 2013 have been fixed and up to 5 can be active at a time, including the player's flashlight.
Most of the work involved is based off of the Alien Swarm SDK, meaning env_projectedtextures use a lot of Alien Swarm I/O/KV and features, like the "Always Update" spawnflag. There's some new features as well, like the ability to set the FOV's width and height separately. (this causes shadow bugs, so be careful)


Mapbase's projected textures are a mix of Insolence's implementation of Alien Swarm projected textures, City 17: Episode One's projected textures, the VDC fixes, and Mapbase's own adjustments.
(talk about stuff here)


For the most part, Insolence's code was just gathered from Alien Swarm and other (credited) projects for its own purposes, but the vast majority of Mapbase's projected texture code--including all of the shader changes--were cherry-picked from Insolence commits.
Most of the work involved is based off of the Alien Swarm SDK, meaning env_projectedtextures use a lot of Alien Swarm I/O/KV and features, like the "Always Update" spawnflag. There's some new features as well, like the ability to set the FOV's width and height separately. (this causes shadow bugs, so be careful)
In Mapbase, up to 5 projected textures with shadows enabled can be active at one time, including the player's flashlight. However, you could use the "-numshadowtextures" launch parameter before starting the game to set the projected texture limit. This is based on the Gmod launch parameter of the same name.
By default, Mapbase uses a shadow map resolution of 2048 with a filter size of 0.5. This can be changed in imaterialsystem.h. See this section on the Valve Developer Community for more information.
-
Something Index
- Something special
- Something else