Created Shader Changes (markdown)

Blixibon 2019-08-24 12:05:40 -05:00
parent 2561c9a12c
commit 4ed16d24ea

21
Shader-Changes.md Normal file

@ -0,0 +1,21 @@
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".
Before we actually get into what these changes are, we need to talk about the caveat of modifying existing shaders:
# The Shader Caveat (IMPORTANT)
The Source SDK comes with the original shader source code and files which you could compile yourself, but Source doesn't actually allow modders to change existing shaders for security reasons. You can create new shaders with code *from* existing shaders, but you can't actually modify existing shaders in the engine. This means you can't add things to the existing `LightmappedGeneric`, but you can create an identical shader called `SDK_LightmappedGeneric` with your own changes. This is how Mapbase modifies the shaders. It uses custom `SDK_` versions of the original shaders.
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.**
This isn't *too* bad since it only needs the VMTs (plain-text material files) to be changed, not the VTFs (actual texture files). Mapbase also already 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.
You could potentially get away with using the original shaders, as there's nothing inherently wrong with them, but they wouldn't look right if they're blended in with modded shaders. (radial fog and projected texture changes in particular would make them look weird) Rope materials also require the `SDK_Cable` shader due to some other code changes that make the original `Cable` unusable.
---
## Actual Shader Changes
These are the changes Mapbase includes for its new shaders:
(todo)