mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-03-28 13:29:03 +03:00
Created Projected textures (markdown)
parent
77c167cc8f
commit
5400cee342
25
Projected-textures.md
Normal file
25
Projected-textures.md
Normal file
@ -0,0 +1,25 @@
|
||||
A **projected texture** is a projection of a texture, projecting light onto surfaces and (optionally) casting dynamic shadows. This is 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 Source 2013.
|
||||
|
||||
In Mapbase, projected textures have been overhauled to make them more stable, more flexible, and more usable.
|
||||
|
||||
---
|
||||
|
||||
Mapbase's projected textures are a mix of [Insolence's implementation of Alien Swarm projected textures](https://github.com/95Navigator/insolence-2013/commits/master), [City 17: Episode One's projected textures](https://github.com/KyleGospo/City-17-Episode-One-Source), [the VDC fixes](https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes), and Mapbase's own adjustments.
|
||||
|
||||
(talk about stuff here)
|
||||
|
||||
From old article:
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<img src="https://i.imgur.com/RiYso9A.jpg" width="256"/>
|
||||
<img src="https://i.imgur.com/z57RxZl.jpg" width="256"/>
|
||||
</p>
|
||||
|
||||
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](https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes#Lowering_the_amount_of_.22grain.22_on_shadows) for more information.
|
Loading…
x
Reference in New Issue
Block a user