mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-03-14 14:40:19 +03:00
Updated Shader Changes (markdown)
parent
cf82817b68
commit
a4a73741ca
@ -10,9 +10,11 @@ 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.**
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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 them look weird. Rope materials also require the `SDK_Cable` shader due to some other code changes that make the original `Cable` unusable.
|
||||
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.
|
||||
|
||||
The only real outright requirement related to new shaders is that rope materials *must* use the `SDK_Cable` shader due to some other code changes that make the original `Cable` unusable.
|
||||
|
||||
---
|
||||
|
||||
@ -26,9 +28,11 @@ The majority of Mapbase's large-scale shader changes come from other projects or
|
||||
|
||||
Other people's work from other people's projects that have been gathered into Mapbase.
|
||||
|
||||
Due to the nature of how these were implemented and how I didn't trust myself to change these things at the time, these changes are not nested in `#ifdef MAPBASE` preprocessors. You could see the differences in the DLL code through Git, but you'll have to do some text comparisons yourself on the FXC files.
|
||||
|
||||
---
|
||||
### Insolence's Alien Swarm/C17:EP1 projected textures
|
||||
Mapbase uses a combination of Alien Swarm, City 17: Episode One, and G-String projected texture changes obtained from Insolence's repository. You can find more information on [the dedicated article](Projected-textures).
|
||||
### Insolence/Alien Swarm/C17:EP1/G-String/VDC projected textures
|
||||
The gnarliest Frankenstein of them all, Mapbase uses a combination of Alien Swarm, City 17: Episode One, and G-String projected texture changes obtained from Insolence's repository, as well as a few relevant VDC fixes. You can find more information on [the dedicated article](Projected-textures).
|
||||
<p align="left">
|
||||
<img src="https://i.imgur.com/eI3RZs0.png" width="640"/>
|
||||
</p>
|
||||
@ -51,15 +55,17 @@ Using white fog in the example picture was probably a bad idea.
|
||||
### C17:EP1's phong on LightmappedGeneric
|
||||
Mapbase uses City 17: Episode One's LightmappedGeneric/WorldVertexTransition phong, implemented from Insolence's repository.
|
||||
|
||||
This was ported with the projected texture changes when Mapbase gleaned shader stuff from the Insolence repo. It was ported because the FXC files were being copied directly instead of cherry-picking individual code changes. (there was a very large number of changes, they weren't replacing existing files, I was still learning how to mod shaders, etc.) There was also some mild demand for them. Again, even though I got this from the Insolence repo, the code was almost entirely from City 17: Episode One and you could find more information on their ModDB page. (todo: link)
|
||||
This was ported with the projected texture changes when Mapbase gleaned shader stuff from the Insolence repo, mostly because it was more difficult to *not* port them than it was to just avoid it. There was also some mild demand for them. Again, even though I got this from the Insolence repo, the code was almost entirely from City 17: Episode One and you could find more information on their ModDB page. (todo: link)
|
||||
|
||||
(todo: also figure out what it looks like for an in-Mapbase screenshot)
|
||||
(todo: also figure out what it looks like with an exponent mask for an in-Mapbase screenshot)
|
||||
|
||||
---
|
||||
### Alien Swarm ropes (SplineRope)
|
||||
Mapbase uses Alien Swarm ropes from Half-Life 2: Downfall, including both the SplineRope shader and the changes to move/keyframe_rope itself.
|
||||
|
||||
The circumstances behind this being added are similar to that of the "brush phong" above, but I didn't know whether this was required for the radial fog changes to work at the time. I still don't know many of the differences, although it does seem to look better.
|
||||
The circumstances behind this being added are similar to that of the "brush phong" above, but I didn't know whether this was required for the radial fog changes to work at the time. I still don't know many of the differences, although to have moved to a new shader I presume it would run faster or look better.
|
||||
|
||||
Even though the shader is actually `SplineRope`, it uses `SDK_Cable` in Mapbase for consistency with the other modded shaders. It needed code changes that make the original `Cable` shader unusable, so hopefully this is worth that sacrifice.
|
||||
|
||||
(todo: figure out more details)
|
||||
|
||||
@ -70,6 +76,8 @@ The circumstances behind this being added are similar to that of the "brush phon
|
||||
|
||||
Shader changes created specifically for Mapbase, mostly by Blixibon.
|
||||
|
||||
The DLL code actually does have these changes nested in `#ifdef MAPBASE`, unlike the "Third Party" changes.
|
||||
|
||||
---
|
||||
### $blendmodulatetexture fixes
|
||||
Mapbase fixes $blendmodulatetexture not appearing under a flashlight, not working with transforms, and lets it show up in Hammer. It also uses Alien Swarm's version of the shader code.
|
||||
@ -84,9 +92,13 @@ Mapbase ports this parameter from Alien Swarm, which allows $phong to be used wi
|
||||
|
||||
---
|
||||
### $basetexturetransform2 on WorldVertexTransition in DX9
|
||||
Mapbase adds $basetexturetransform2 to the DX9 version of the shader.
|
||||
Mapbase adds `$basetexturetransform2` to the DX9 version of the shader.
|
||||
|
||||
$basetexturetransform2 already existed on the
|
||||
The issue was that `$basetexturetransform2` actually only existed in the DirectX 8 version of the shader, simply not appearing in the DirectX 9 version. It's a strange anomaly and it's hard to decide whether Valve didn't think it was worth the trouble or literally just forgot. There's definitely a FIXME or two related to it.
|
||||
|
||||
It doesn't work with $seamless_scale or the C17:EP1 brush phong.
|
||||
Before this, `$basetexture2` followed the original `$basetexturetransform` in DX9, so this only functions if you declare `$basetexturetransform2` first:
|
||||
|
||||
$basetexturetransform2 "center .5 .5 scale 1 1 rotate 0 translate 0 0"
|
||||
|
||||
It doesn't work with `$seamless_scale` or the C17:EP1 brush phong.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user