LUX: Difference between revisions
m (→Credits) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{langsp}} | {{langsp}} | ||
{{LUX|4}} is a [[Modification|mod]] specifically made and developed for use in {{src13sp|4}} and {{src13mp|4}}.<br> | {{LUX|4}} is a [[Modification|mod]] specifically made and developed for use in {{src13sp|4.1}} and {{src13mp|4.1}}.<br> | ||
The Project is to entirely rewrite all existing "'''SDK_'''" Shaders, that come with the SDK and all those available in {{mapbase| | The Project is to entirely rewrite all existing "'''SDK_'''" Shaders, that come with the SDK and all those available in {{mapbase|4.1}}. | ||
== Goals == | == Goals == | ||
* '''Overhauled/Cleaned | * '''Overhauled/Cleaned {{file|materialsystem\stdshaders\}} Folder''' | ||
: {{ | : {{Warning|Pretty much everything except existing shader-compile functionality is pretty much "nuked".}} | ||
: {{Note|SDK_ Shaders will fall back to LUX_ Shaders, that way {{LUX|2}} can easily be used on {{mapbase|4}} mods without much work.}} | : {{Note|SDK_ Shaders will fall back to LUX_ Shaders, that way {{LUX|2}} can easily be used on {{mapbase|4.1}} mods without much work.}} | ||
: {{Notice| Implementing {{LUX|2}} Shaders would entail replacing the existing | : {{Notice| Implementing {{LUX|2}} Shaders would entail replacing the existing {{file|stdshaders\}} with the one from {{LUX|2}}. Effectively 'nuking' SDK_ Shaders. {{LUX|2}} Shaders should be able to do everything SDK_ Shaders in {{src13}} and {{mapbase}} can do.}} | ||
<br> | <br> | ||
* '''Drastically decreased compile-times for all Shaders''' | * '''Drastically decreased compile-times for all Shaders''' | ||
Line 15: | Line 15: | ||
* '''SM3.0 Shaders Only''' | * '''SM3.0 Shaders Only''' | ||
: {{Why|ps20b and below is too limiting. The lack of available constant registers causes extreme branching and a lot of 'combos'. Making the code terrible to read and complicated. This disincentives Modders.}} | : {{Why|ps20b and below is too limiting. The lack of available constant registers causes extreme branching and a lot of 'combos'. Making the code terrible to read and complicated. This disincentives Modders.}} | ||
: {{Notice| | : {{Notice|{{linux|4.1}} is not officially supported. {{Mac|4.1}} is also not officially supported. Users of said systems will have to either patch <code>togl</code> to work with SM3.0 or use DxVK. }} | ||
: {{Note| | : {{Note| | ||
:* SM3.0 released in 2004, and [https://cdn.cloudflare.steamstatic.com/apps/valve/2010/siggraph2010_vlachos_waterflow.pdf Valve considered ps2.0b low end hardware in ~2008]. See slide '''8''' | :* SM3.0 released in 2004, and [https://cdn.cloudflare.steamstatic.com/apps/valve/2010/siggraph2010_vlachos_waterflow.pdf Valve considered ps2.0b low end hardware in ~2008]. See slide '''8''' | ||
Line 23: | Line 23: | ||
<br> | <br> | ||
* '''More Documentation for Shaders, their parameters, how they work and any possible caveats''' | * '''More Documentation for Shaders, their parameters, how they work and any possible caveats''' | ||
: {{Notice|You might have noticed Articles like {{Ent|$lightwarptexture}}, {{Ent|$detail}}, {{Ent|UnlitTwoTexture}} and {{Ent|$envmapmask}} getting major updates from [[User:ShiroDkxtro2|ShiroDkxtro2]], | : {{Notice|You might have noticed Articles like {{Ent|$lightwarptexture}}, {{Ent|$detail}}, {{Ent|UnlitTwoTexture}} and {{Ent|$envmapmask}} getting major updates from [[User:ShiroDkxtro2|ShiroDkxtro2]], where new information about caveats and bugs were added for {{tf2}}{{as}}{{src13}}{{csgo}}. This was a direct result of {{LUX|2}} development, although the focus was mainly on {{src13}}{{as}} as their code is publicly available. }} | ||
: {{Note|The current lack of documentation on how Shaders work in Source disincentives learning how to mod Shaders or make their own. The barrier of entry is very high as a lot of very specific knowledge is required too.}} | |||
: {{Note|The current lack of documentation on how Shaders work in Source | |||
<br> | <br> | ||
* '''Implementing features that aren't available in {{src13}}''' | * '''Implementing features that aren't available in {{src13|4.1}}''' | ||
: {{Seealso|[[LUX#Planned Features|Planned Features]]. This includes old features such as [[Glowing_Textures#.24selfillum|$selfillumtexture]] and newer features like [[$phong#Colors|$phongalbedoboost]]{{csgo|only}}.}} | : {{Seealso|[[LUX#Planned Features|Planned Features]]. This includes old features such as [[Glowing_Textures#.24selfillum|$selfillumtexture]] and newer features like [[$phong#Colors|$phongalbedoboost]]{{csgo|only}}.}} | ||
<br> | <br> | ||
Line 38: | Line 37: | ||
<br> | <br> | ||
* '''Mapbase compatibility''' | * '''Mapbase compatibility''' | ||
: {{Notice|Replacing SDK_ Shaders in SDK mods, SDK2013CE or Mapbase mods should be as simple as replacing the | : {{Notice|Replacing SDK_ Shaders in SDK mods, SDK2013CE or Mapbase mods should be as simple as replacing the {{file|stdshaders\}} Folder.}} | ||
: {{Note|It is assumed that no custom Shaders apart from SDK_ ones were added. If they were added, developers should be capable of adding them back/recreating them.}} | : {{Note|It is assumed that no custom Shaders apart from SDK_ ones were added. If they were added, developers should be capable of adding them back/recreating them.}} | ||
<br> | <br> | ||
Line 53: | Line 52: | ||
=== Features required for {{mapbase|4.1}} compatibility === | === Features required for {{mapbase|4.1}} compatibility === | ||
{{ModernImportant|The parameters are the same for {{LUX|2}} and {{mapbase}}. This means that Mapbase's compilers can also be used}} | {{ModernImportant|The parameters are the same for {{LUX|2}} and {{mapbase}}. This means that Mapbase's compilers can also be used}} | ||
* [[$phong#Brightness|$phongdisablehalflambert]] from the {{asbranch|4}} | * [[$phong#Brightness|$phongdisablehalflambert]] from the {{asbranch|4.1}} | ||
* Radial Fog for all "Geometry" Shaders | * Radial Fog for all "Geometry" Shaders | ||
* Spline-Ropes | * Spline-Ropes | ||
Line 64: | Line 63: | ||
* Brush {{Ent|$phong}} | * Brush {{Ent|$phong}} | ||
* Treesway | * Treesway | ||
{{todo|Is the {{mapbase}} implementation ported from {{as}}?}} | {{todo|Is the {{mapbase|4.1}} implementation ported from {{as|4.1}}?}} | ||
* [[$bumpmap#Additional_Parameters|$bumpmask]] and related | * [[$bumpmap#Additional_Parameters|$bumpmask]] and related | ||
<br> | <br> | ||
=== New Features === | === New Features === | ||
* In {{src13mp}} Models utilizing Model Lightmapping can use {{Ent|$bumpmap}}. Additionally, all Model shaders will be able to utilize this feature. Except they have {{Ent|$phong}}. | * In {{src13mp|4.1}} Models utilizing Model Lightmapping can use {{Ent|$bumpmap}}. Additionally, all Model shaders will be able to utilize this feature. Except they have {{Ent|$phong}}. | ||
{{ModernImportant|The Lightmap does not do bumped-lighting using the bumpmap. Only named lights/projected textures will be able to do so.}} | {{ModernImportant|The Lightmap does not do bumped-lighting using the bumpmap. Only named lights/projected textures will be able to do so.}} | ||
{{Note| Lightmapped models will not be able to receive {{Ent|$phong}}. This is not planned at the moment but should be possible for named | {{Note| Lightmapped models will not be able to receive {{Ent|$phong}}. This is not planned at the moment but should be possible for named lights/projected textures!}} | ||
* In {{src13mp}} Models can utilize Lightmap UV's. | * In {{src13mp}} Models can utilize Lightmap UV's. | ||
{{warning|The way this is currently implemented requires a custom written tool, two SMDs ( one with lightmap uv ), and also has a lot of precision loss for the Lightmap UVs. Additionally, this requires a custom compiler! }} | {{warning|The way this is currently implemented requires a custom written tool, two SMDs ( one with lightmap uv ), and also has a lot of precision loss for the Lightmap UVs. Additionally, this requires a custom compiler! }} | ||
:{{todo|Investigate {{src07}} code, supposedly the Studiomdl code is there. Maybe it can be packed via Blendweights or | :{{todo|Investigate {{src07|4.1}} code, supposedly the Studiomdl code is there. Maybe it can be packed via Blendweights or the precision loss might be decreased.}} | ||
=== Features ported/recreated === | === Features ported/recreated === | ||
Line 83: | Line 82: | ||
{{Note| {{LUX|2}} allows the use of Rec. 709 HDTV Luminance Weights. <code>float3(0.2126f, 0.7152f, 0.0722f)</code>.<br>Previously, SDK_ Shaders would use the NTSC Analog Television standard of <code>float3(0.2990f, 0.5870f, 0.1140f)</code>}} | {{Note| {{LUX|2}} allows the use of Rec. 709 HDTV Luminance Weights. <code>float3(0.2126f, 0.7152f, 0.0722f)</code>.<br>Previously, SDK_ Shaders would use the NTSC Analog Television standard of <code>float3(0.2990f, 0.5870f, 0.1140f)</code>}} | ||
* [[Glowing_Textures#.24selfillum|$selfillumtexture]] Deprecated since {{src07}} | * [[Glowing_Textures#.24selfillum|$selfillumtexture]] Deprecated since {{src07|4.1}} | ||
{{Note| Yes, there is a use for this! [[$detail#Parameters and Effects|$detailblendmode]] 5 is commonly used for glowing textures. This parameter allows for not wasting your $detail. Additionally no $emissiveblend is required.}} | {{Note| Yes, there is a use for this! [[$detail#Parameters and Effects|$detailblendmode]] 5 is commonly used for glowing textures. This parameter allows for not wasting your $detail. Additionally no $emissiveblend is required.}} | ||
: {{seealso|PBR Shaders in the community commonly have a $emissiontexture parameter that does EXACTLY what [[Glowing_Textures#.24selfillum|$selfillumtexture]] does in {{LUX|2}}.}} | : {{seealso|PBR Shaders in the community commonly have a $emissiontexture parameter that does EXACTLY what [[Glowing_Textures#.24selfillum|$selfillumtexture]] does in {{LUX|2}}.}} | ||
Line 94: | Line 93: | ||
* On models '''without''' {{Ent|$bumpmap}}, this will use Vertex Lighting. | * On models '''without''' {{Ent|$bumpmap}}, this will use Vertex Lighting. | ||
* In {{src13mp}} Models utilizing Model Lightmapping, this will use the Lightmap, regardless of if {{Ent|$bumpmap}} is used.}} | * In {{src13mp}} Models utilizing Model Lightmapping, this will use the Lightmap, regardless of if {{Ent|$bumpmap}} is used.}} | ||
=== Features that '''won't''' be ported/recreated/revived === | === Features that '''won't''' be ported/recreated/revived === | ||
* $basealphaenvmapmaskminmaxexp from {{as|4.1}} - This parameter is not yet documented on the VDC, it is also unclear what exactly it does... | * $basealphaenvmapmaskminmaxexp from {{as|4.1}} - This parameter is not yet documented on the VDC, it is also unclear what exactly it does... | ||
* $EnvMapLightScaleMinMax from {{csgo|4.1}} | * $EnvMapLightScaleMinMax from {{csgo|4.1}} | ||
* {{Ent|$envmapsphere}} and related - These features have been removed since {{as|4.1}} and is obsolete. | |||
{{Note|This is very easy to re-implement. The 7th face of a [[cubemap]] is still built in {{src13}}, so this feature is still operational.}} | |||
=== Not functional - FOR NOW === | === Not functional - FOR NOW === | ||
Line 118: | Line 115: | ||
[[$detail#Parameters and Effects|$detailblendmode]]{{as}} 6 Doesn't work.<br> | [[$detail#Parameters and Effects|$detailblendmode]]{{as}} 6 Doesn't work.<br> | ||
[[$detail#Parameters and Effects|$detailblendmode]]{{csgo}} 1-6, 8 Don't work. 9 Does not work with {{Ent|$bumpmap}}, {{Ent|$envmap}} or {{Ent|$selfillum}}<br> | [[$detail#Parameters and Effects|$detailblendmode]]{{csgo}} 1-6, 8 Don't work. 9 Does not work with {{Ent|$bumpmap}}, {{Ent|$envmap}} or {{Ent|$selfillum}}<br> | ||
{{Ent|$bumpmap}} + {{Ent|$envmapmask}} Doesn't work, except in {{csgo|4}}<br> | {{Ent|$bumpmap}} + {{Ent|$envmapmask}} Doesn't work, except in {{csgo|4.1}}<br> | ||
{{Ent|$lightwarptexture}} + {{Ent|$detail}}{{tf2}}{{as}} Doesn't work.<br> | {{Ent|$lightwarptexture}} + {{Ent|$detail}}{{tf2}}{{as}} Doesn't work.<br> | ||
{{Ent|$basealphaenvmapmask}} + {{Ent|bumpmap}} Doesn't work}} | {{Ent|$basealphaenvmapmask}} + {{Ent|bumpmap}} Doesn't work}} | ||
Line 129: | Line 126: | ||
[[$detail#Parameters and Effects|$detailtexturetransform]] Missing<br> | [[$detail#Parameters and Effects|$detailtexturetransform]] Missing<br> | ||
{{Ent|$lightwarptexture}}{{csgo}} Missing<br> | {{Ent|$lightwarptexture}}{{csgo}} Missing<br> | ||
{{Ent|$envmapfresnelminmaxexp}}{{ | {{Ent|$envmapfresnelminmaxexp}}{{l4d|since}}<br> | ||
{{Ent|$envmaplightscale}}{{ | {{Ent|$envmaplightscale}}{{as|since}}<br> | ||
{{Notice|{{Ent|$basealphaenvmapmask}} requires inverted masks}} | {{Notice|{{Ent|$basealphaenvmapmask}} requires inverted masks}} | ||
Line 153: | Line 150: | ||
{{ModernImportant|{{Ent|$basealphaenvmapmask}} does no longer require a flipped mask.}} | {{ModernImportant|{{Ent|$basealphaenvmapmask}} does no longer require a flipped mask.}} | ||
:{{workaround|There is a new parameter | :{{workaround|There is a new parameter that can flip the envmap mask. It also works with {{Ent|$envmapmask}} and {{Ent|$normalmapalphaenvmapmask}}.}} | ||
|} | |} | ||
Line 196: | Line 193: | ||
[[Glowing_Textures#.24selfillum|$selfillumfresnel]] will cause {{Ent|$envmap}} to be masked using the {{Ent|$basetexture}} alpha channel.}}}} | [[Glowing_Textures#.24selfillum|$selfillumfresnel]] will cause {{Ent|$envmap}} to be masked using the {{Ent|$basetexture}} alpha channel.}}}} | ||
{{Note|[[$phong#Brightness|$phongdisablehalflambert]] | {{Note|[[$phong#Brightness|$phongdisablehalflambert]]{{as|since}}<br> | ||
[[$phong#Masking|$phongexponentfactor]] only in {{tf2}}{{src13mp}}<br> | [[$phong#Masking|$phongexponentfactor]] only in {{tf2}}{{src13mp}}<br> | ||
[[$phong#Masking|$basemapluminancephongmask]] | [[$phong#Masking|$basemapluminancephongmask]]{{l4d|since}}<br> | ||
[[$phong#Colors|$phongalbedoboost]] only in {{csgo}} | [[$phong#Colors|$phongalbedoboost]] only in {{csgo|since}}}} | ||
| width="50%" | | | width="50%" | | ||
Line 228: | Line 225: | ||
:{{Notice|Will use entirety of {{Ent|$basetexture}}, without being masked.}} | :{{Notice|Will use entirety of {{Ent|$basetexture}}, without being masked.}} | ||
* [[$phong#Colors|$phongwarptexture]] | * [[$phong#Colors|$phongwarptexture]] Works ( {{not|l4d2|4.1}} ).<br> | ||
* [[$phong#Colors|$phongalbedoboost]] Exists now. Used to be {{only|{{csgo}}.}} | * [[$phong#Colors|$phongalbedoboost]] Exists now. Used to be {{only|{{csgo}}.}} | ||
* [[$phong#Colors|$phongalbedoboost]] + {{Ent|$detail}} Works. Does not work in {{csgo|4}}.<br> | * [[$phong#Colors|$phongalbedoboost]] + {{Ent|$detail}} Works. Does not work in {{csgo|4.1}}.<br> | ||
{{Note|[[$phong#Colors|$phongtint]] does no longer disable [[$phong#Colors|$phongalbedotint]]. It will do <code>($baseTexture * Mask) * $PhongTint</code>}} | {{Note|[[$phong#Colors|$phongtint]] does no longer disable [[$phong#Colors|$phongalbedotint]]. It will do <code>($baseTexture * Mask) * $PhongTint</code>}} | ||
Line 236: | Line 233: | ||
* {{Ent|$envmap}} Can now be not-masked by using a new parameter (<code>$phongenvmapnomask</code>) | * {{Ent|$envmap}} Can now be not-masked by using a new parameter (<code>$phongenvmapnomask</code>) | ||
: {{ModernImportant|By default the original masking for the $envmap will be replicated to not have disparity. However, it can now be | : {{ModernImportant|By default the original masking for the $envmap will be replicated to not have disparity. However, it can now be overridden using two new parameters. <code>$phongforcebasealphaenvmapmask</code> and <code>$phongforcenormalmapalphaenvmapmask</code>}} | ||
* [[$phong#Masking|$basemapalphaphongmask]] '''no longer''' makes {{Ent|$phong}} ignore the {{Ent|$bumpmap}}. | * [[$phong#Masking|$basemapalphaphongmask]] '''no longer''' makes {{Ent|$phong}} ignore the {{Ent|$bumpmap}}. | ||
Line 242: | Line 239: | ||
* [[Glowing_Textures#.24selfillum|$selfillumfresnel]] + {{Ent|$normalmapalphaenvmapmask}} will no longer multiply the {{Ent|$envmap}} by <code>0.0f</code> | * [[Glowing_Textures#.24selfillum|$selfillumfresnel]] + {{Ent|$normalmapalphaenvmapmask}} will no longer multiply the {{Ent|$envmap}} by <code>0.0f</code> | ||
* [[$phong#Brightness|$phongdisablehalflambert]] Exists now. ( Used to be {{only|{{as}}+}} | * [[$phong#Brightness|$phongdisablehalflambert]] Exists now. ( Used to be {{only|{{as}}+}} | ||
* [[$phong#Masking|$phongexponentfactor]] Exists now for {{src13sp}}. ( Used to be {{only|{{tf2}}{{src13mp}}}} | * [[$phong#Masking|$phongexponentfactor]] Exists now for {{src13sp}}. ( Used to be {{only|{{tf2}}{{src13mp}}}}) | ||
* [[$phong#Masking|$basemapluminancephongmask]] Exists now. ( Used to be {{ | * [[$phong#Masking|$basemapluminancephongmask]] Exists now. ( Used to be {{since|l4d}}) | ||
* [[$phong#Colors|$phongalbedoboost]] Exists now. ( Used to be {{ | * [[$phong#Colors|$phongalbedoboost]] Exists now. ( Used to be {{since|csgo}}) | ||
|} | |} | ||
Line 293: | Line 290: | ||
== See also == | == See also == | ||
* {{LUX| | * {{LUX|4.1}} [https://discord.gg/cGv8GGSkpc Discord] Server | ||
: Development can be followed here, Bug-Reports & suggestions made. | : Development can be followed here, Bug-Reports & suggestions made. | ||
: It is also intended as a general place for discussing {{src13| | : It is also intended as a general place for discussing {{src13|4.1}} related Shader-Modding. | ||
* {{LUX| | * {{LUX|4.1}} [https://github.com/ShiroDkxtro2/ACROHS-LUX_-Shaders-Project GitHub] page | ||
{{Todo|Make a new category for LUX_ Shaders and document them and their parameters there, instead of here. Preferably after they were released on the GitHub.}} | {{Todo|Make a new category for LUX_ Shaders and document them and their parameters there, instead of here. Preferably after they were released on the GitHub.}} |
Revision as of 08:39, 6 February 2024
LUX is a mod specifically made and developed for use in
Source 2013 Singleplayer and
Source 2013 Multiplayer.
The Project is to entirely rewrite all existing "SDK_" Shaders, that come with the SDK and all those available in Mapbase.
Goals
- Overhauled/Cleaned
materialsystem\stdshaders\
Folder
Warning:Pretty much everything except existing shader-compile functionality is pretty much "nuked".
- Drastically decreased compile-times for all Shaders
Note:Even on a good CPU it can take half a day, 'or more. As an example for
LUX. Compiling the entirety of LUX_LightMappedGeneric takes around 30 seconds on 4 cores @4.1GHz
- SM3.0 Shaders Only
- Why?: ps20b and below is too limiting. The lack of available constant registers causes extreme branching and a lot of 'combos'. Making the code terrible to read and complicated. This disincentives Modders.
Note:
- SM3.0 released in 2004, and Valve considered ps2.0b low end hardware in ~2008. See slide 8
- This means that older hardware not capable of SM3.0 will not be able to use the new Shaders.
- Totally rewritten .h, .cpp, .fxc files
- More Documentation for Shaders, their parameters, how they work and any possible caveats
Note:You might have noticed Articles like $lightwarptexture, $detail, UnlitTwoTexture and $envmapmask getting major updates from ShiroDkxtro2, where new information about caveats and bugs were added for
. This was a direct result of
LUX development, although the focus was mainly on
as their code is publicly available.
Note:The current lack of documentation on how Shaders work in Source disincentives learning how to mod Shaders or make their own. The barrier of entry is very high as a lot of very specific knowledge is required too.
- Implementing features that aren't available in
Source 2013
- See also: Planned Features. This includes old features such as $selfillumtexture and newer features like $phongalbedoboost(only in
).
- Fixing most Parameter "bugs:" and other caveats
- See also: Stock Shaders VS LUX
- Easy way of disabling features
Important:A custom Pre-Processor program has been made. It automatically sets
// STATIC:
's to predefined values depending on#define
's in an included header file.Note:Mods that don't require specific features (lightwarptexture/distancealpha/phong/envmaps/etc), can easily disable them and further increase Shader compilation speed. Most parameters have been
#ifdef
'd in the c++ code!
- Mapbase compatibility
Note:Replacing SDK_ Shaders in SDK mods, SDK2013CE or Mapbase mods should be as simple as replacing the
stdshaders\
Folder.Note:It is assumed that no custom Shaders apart from SDK_ ones were added. If they were added, developers should be capable of adding them back/recreating them.
Planned Features
This is a list of new features that are being implemented / will be implemented from newer branches such as
The code will be heavily modified to simplify or overhaul


Warning:For more complicated features, there might be visual disparity when compared to official implementations.
Features required for
Mapbase compatibility



- $phongdisablehalflambert from the
Alien Swarm engine branch
- Radial Fog for all "Geometry" Shaders
- Spline-Ropes
- Parallax Corrected Cubemaps ( PCC )


- $envmapmask + $bumpmap on VertexLitGeneric
- Replacement for the "Postprocessing" Controller Shader
- Replacement for the "Engine_post" Shader from
- Hammer $blendmodulatetexture previewing fix.
- Brush $phong
- Treesway


- $bumpmask and related
New Features
- In
Source 2013 Multiplayer Models utilizing Model Lightmapping can use $bumpmap. Additionally, all Model shaders will be able to utilize this feature. Except they have $phong.



- Todo: Investigate
Source 2007 code, supposedly the Studiomdl code is there. Maybe it can be packed via Blendweights or the precision loss might be decreased.
Features ported/recreated
- $phongdisablehalflambert (in all games since
) - Also needed for
Mapbase
- $phongexponentfactor From
Source 2013 Multiplayer/
Team Fortress 2 and with
LUX, also supports
Source 2013 Singleplayer
- $phongalbedoboost (in all games since
) - Its just
BaseTexture * $PhongAlbedoBoost
... No leaked code! - $basemapluminancephongmask (in all games since
)


float3(0.2126f, 0.7152f, 0.0722f)
.Previously, SDK_ Shaders would use the NTSC Analog Television standard of
float3(0.2990f, 0.5870f, 0.1140f)
- $selfillumtexture Deprecated since
Source 2007

- See also: PBR Shaders in the community commonly have a $emissiontexture parameter that does EXACTLY what $selfillumtexture does in
LUX.
- Water Shader with $flowmap Support - From
- $envmaplightscale From for brushes (in all games since
) and models (only in
)

Features that won't be ported/recreated/revived
- $basealphaenvmapmaskminmaxexp from
Alien Swarm - This parameter is not yet documented on the VDC, it is also unclear what exactly it does...
- $EnvMapLightScaleMinMax from
Counter-Strike: Global Offensive
- $envmapsphere and related - These features have been removed since
Alien Swarm and is obsolete.


Not functional - FOR NOW
- $distancealpha - Non-Functional. Planned for later.
Stock Shaders VS LUX
LightmappedGeneric
Stock Shaders![]() $detailblendmode {{Note|
$selfillummask Missing ![]() |
|
VertexLitGeneric
Stock ShadersAlways$envmaplightscale(only in Without $Bumpmap![]() ![]() ![]() ![]() ![]() $selfillumfresnel missing. ![]()
With $Bumpmap![]() $detailblendmode ![]() ![]() $envmapmask missing. Except $selfillum_envmapmask_alpha
With $Phong![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() $phongalbedotint cannot be used without $phongexponenttexture. ![]() ![]() $phongexponentfactor only in ![]() |
|
History
LUX started development on January 20th, 2023, but it was planned and thought around January 14th, when the lead developer ShiroDkxtro2 was in a hospital stay.
Even before 2023, the idea of rewriting Valve's shaders was being considered. Various people asked ShiroDkxtro2 if certain modifications could be implemented for default shaders, such as cascaded shadow mapping.
These requests would usually result in a simple "no", as modifying the default shaders was not considered feasible for various reasons, most of which are indirectly mentioned in LUX's Goals.
The project's inception was supposed to be a means to make the existing shaders more moddable, with new features in mind and laid out so that implementing new things would be easier.
Credits
LUX uses SCell555's ShaderCompiler
- However, it is only used to compile the Shaders. Include files ( .inc ) are intended to be made using Perl.
LUX copies various code from thexa4's PBR header
Tottery ( Also known as TotteryNine )
- TotteryNine was crucial to ShiroDkxtro2 for learning the basics and more complicated aspects of making and compiling Shaders.
Sitkinator
- Aiding with the initial logo and adding a screen-reflection effect to it.
Mr.Kleiner
- For writing various tools. Including a VTF Flagging tool for Cubemaps inside a .bsp file, a tool for packing lightmap UV's into .smd files
roman_memes
- Various logical checks and ideas. Also helped with prototyping new features and finding siggraph or other papers regarding modern and oldschool graphical implementations.
Alivebyte!
- For doing modifications to the ShaderCompiler, which so far have not been implemented into the repo.
- For enlightening us about the Constant Register Hack, allowing for the use of more than 32 float constant registers on SM3.0
- This Project would be nearly impossible without it.
ChatGPT
- Help with programming and the undocumented graphical features of the Source Engine.
- It knows things and can make new things to a degree. Various code used in
LUX has been partially written by AI.
- Since one of the goals of this project is to be compatible with it, various code from it has been adapted.
- This means that all Shader-related things should also be inherited with the credits of
LUX. You can find Mapbase's credits HERE.
Source++ code might be included with LUX.
One example would be the NvidiaPCF5x5Gaussian Shadow Filter
Note:What else from S++ is used in
LUX?
ShiroDkxtro2 would also like to thank Joshua Ashton personally for his various open-source work related to the Source Engine.
See also
- Development can be followed here, Bug-Reports & suggestions made.
- It is also intended as a general place for discussing
Source 2013 related Shader-Modding.