Updated Shader Changes (markdown)

Blixibon 2019-09-24 09:54:54 -05:00
parent 6abe3f1dd7
commit 572ff5f1a3

@ -1,6 +1,6 @@
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.
**Shaders** are special programs used to render the scene on a user's 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 serve as quality-of-life improvements. This trend started with the projected texture fixes and more features were added from there to help make the steep caveat for modifying shaders worth the trouble.
Mapbase modifies the shaders in various ways, but most of 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. This trend started with the projected texture fixes and more features were added from there to help make the steep caveat for modifying shaders worth the trouble.
(todo: talk about mods that have already changed shaders)
@ -12,7 +12,7 @@ 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, 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.
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 increases loading times.
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.