mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-12 14:57:56 +03:00
Updated Shader Changes (markdown)
parent
2f05d615fe
commit
8f333bce45
@ -1,10 +1,10 @@
|
||||
Shaders are special programs ran by the GPU. The Source SDK allows modders to modify or add shaders to the engine, as many mods have done.
|
||||
|
||||
Mapbase modifies the shaders in various ways, but these changes aren't meant to improve graphical quality as much as they're meant to fix bugs or "improve the mapping experience".
|
||||
Mapbase modifies the shaders in various ways, but these changes aren't meant to improve graphical quality as much as they're meant to fix bugs or serve as quality-of-life improvements.
|
||||
|
||||
(todo: talk about mods that have already changed shaders)
|
||||
|
||||
Before we actually get into what these changes are, we need to talk about the caveat of modifying existing shaders:
|
||||
Before we actually get into what these changes are, we need to talk about the main caveat of modifying existing shaders and how Mapbase gets past this caveat:
|
||||
|
||||
# The Shader Caveat (IMPORTANT)
|
||||
|
||||
@ -12,7 +12,9 @@ The Source SDK comes with the original shader source code and files which you co
|
||||
|
||||
The problem is that materials still using the original shaders won't use Mapbase's shader changes, so in order to take advantage of these changes, **you must change all of your materials to use the custom shaders.**
|
||||
|
||||
Some mods go for things like an automatic passthrough system, but that has problems like material proxies being lost or decals not working with it. We instead opted for renaming all of the shaders in the VMTs themselves, which isn't *too* bad since these are just the VMTs (plain-text material files), not the VTFs (actual texture files), and Mapbase comes with converted versions of all of Half-Life 2/EP1/EP2's VMTs, neatly packed in VPKs and staying at about 2-3 MB total, so you'd only have to worry about this if you're adding custom materials or mounting materials from another game. Mapbase also provides an "installer" that can automatically change all of the materials in a directory to the new shaders.
|
||||
Some mods go for things like an automatic passthrough system, which means all materials are changed to the new shaders without requiring the modificaton of any VMT files. This is useful for when you can't easily change every VMT that could be used in-game, e.g. when there's tons of VMTs embedded in tons of MP maps, but that has problems like material proxies being lost or decals not working with it. It also apparently slows things down.
|
||||
|
||||
For Mapbase, we instead opted for renaming all of the shaders in the VMTs themselves, which is the most basic and tedious solution, but the end result is much more efficient than the alternative. This isn't really too much of a problem, as these are just the plain-text VMTs, not the actual texture VTFs. Mapbase also comes with converted versions of all of Half-Life 2/EP1/EP2's VMTs, neatly packed in VPKs and staying at only about 2-3 MB total, so you'd only have to worry about this if you're adding custom materials or mounting materials from another game/mod. If you are using custom materials or mounting materials from another game/mod, **Mapbase's installer contains a tool that can automatically change all of the materials in a directory to the new shaders.** In one trial, the mod version of Black Mesa: Source's 3,974 VMTs were converted to the new shaders in 1 minute and 58 seconds. It's recommended that you pack converted VMTs into a VPK file.
|
||||
|
||||
You could potentially get away with using the original shaders if you don't need Mapbase's shader changes, as there's nothing inherently wrong with them, but they wouldn't look right if they're used alongside modded shaders because features like radial fog and projected texture changes would make their differences visible.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user