LUX: Difference between revisions
m (Setting bug notice hidetested=1 param on page where the bug might not need tested in param specified) |
ShiroDkxtro2 (talk | contribs) (Up-to-date Information about the Project) |
||
Line 1: | Line 1: | ||
{{LanguageBar}} | {{LanguageBar}} | ||
{{Infotable | {{Infotable | ||
| state = | | state = 4 | ||
| ownwiki = https://github.com/ | | ownwiki = https://github.com/LUX-Shaders-Team/LUX-Shaders/wiki | ||
| type = m0 | | type = m0 | ||
| dev = [[User:ShiroDkxtro2|ShiroDkxtro2]] | | dev = [[User:ShiroDkxtro2|ShiroDkxtro2]] | ||
| engine = 2 | | engine = 2 | ||
| base = {{src13|4}} | | base = {{src13|4}} | ||
| platform = {{PC|4}} | | platform = {{PC|4}} ( {{linux|4}} {{src13mp|only}} ) | ||
| github = | | github = LUX-Shaders-Team/LUX-Shaders | ||
| discord = https://discord.gg/cGv8GGSkpc | | discord = https://discord.gg/cGv8GGSkpc | ||
}} | }} | ||
{{LUX|4}} is a [[Modification|mod]] | {{LUX|4}} is a [[Modification|mod]] made for {{src13sp|4.1}} and {{src13mp|4.1}}.<br> | ||
The Project is to | The goal of the Project is a reevaluated and rewritten set of shaders, that are faster to compile, easier to debug and modify.<br> | ||
It resolves caveats and introduces new features, sometimes replicating those from newer source branches.<br> | |||
The shaders are not designed to boost performance, don't expect superficial increases in fps.<br> | |||
LUX can serve as a drop-in replacement to the shaders from {{mapbase|4.1}}.<br> | |||
Although it references Alien Swarm Code, the branch itself is not supported.<br> | |||
Similarly, {{Mac|4.1}} is not supported.<br> | |||
LUX is based on publicly available code and has a strict no leaked-code policy.<br> | |||
== Goals == | == Goals == | ||
* Total Overhaul of the {{file|materialsystem\}} folder | |||
: Implementing {{LUX|4.1}} | : Implementing {{LUX|4.1}} is intended to be as easy as possible. To ensure this, changes are restricted to the {{file|materialsystem\}} folder. | ||
: | : Using Code from the Orange Box and Alien Swarm, {{file|materialsystem\shaderlib}} has been added back in and is used to implement new features. | ||
: Previously LUX was limited to the {{file|materialsystem\stdshaders}} folder. Now it's {{file|materialsystem\}} to allow for this. | |||
* Faster compile times for all Shaders | |||
: All shaders have been rewritten from scratch and the systems they use have been reevaluated. | |||
: | : Due to this, all shaders in the project can be compiled in about 15 minutes on dated hardware. | ||
: For newer Hardware ( r9 5950x ), you may see times as low as two minutes. | |||
: Various shaders now have their own .bat scripts. Making it easier to develop individual shaders. | |||
: This means modding specific shaders ( such as VertexLitGeneric ) is much faster. | |||
: {{ | : Now changing a header does not mean having to 'recompile the universe' | ||
: | * Compatability with {{mapbase|4.1}} | ||
: | : {{LUX|4.1}} intends to serve as a drop-in replacement for Mapbase Shaders | ||
: Thus it has features such as Parallax Corrected Cubemaps ( and much more.. radial fog, non-location specific Core Shader, .. ) | |||
: To facilitate this, every SDK_ Prefixed Shader will fallback to LUX_ | |||
: | * Stock Shader replacement | ||
: | : {{LUX|4.1}} allows for the selective replacement of existing shaders on {{src13mp|4.1}}. | ||
: Using Various other methods such as memory patching or material passthrough this may also be used on {{src13sp|4.1}} | |||
* Shadermodel 3.0 only | |||
: | : To allow for many of the new features, all of the Shaders use Shadermodel 3.0. | ||
: A limitation created by this is that Linux on {{src13sp|4.1}} cannot run LUX, since ToGL does not have support for it, | |||
: DXVK may serve as an alternative here for Linux Users. | |||
: | : 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''' | ||
: This means that older hardware not capable of SM3.0 will not be able to use the new Shaders either. | |||
* Drastically more documentation, including their parameters, how they work and any possible caveats | |||
: | : Due to the Development of {{LUX|4.1}}, Articles on the VDC such as {{Ent|$lightwarptexture}}, {{Ent|$detail}}, {{Ent|UnlitTwoTexture}} and {{Ent|$envmapmask}} | ||
: received massive updates, filling them with information about caveats and bugs. | |||
: LUX shaders themselves have many comments, notifying when the behaviour of stock shaders has to be considered to keep visual consistency. | |||
: | : A Github Wiki listing all shader parameters and all shaders in the project is in the works. | ||
: Helper strings have been added to all parameters and can be read back via the in-game console as well. | |||
* Implementing features unavailable to {{src13|4.1}} | |||
: This includes old features such as [[Glowing_Textures#.24selfillum|$selfillumtexture]] and newer features like [[$phong#Colors|$phongalbedoboost]]{{csgo|only}}. | |||
: Note that LUX is not made from leaked code. Features (such as $SSBumpMathFix) have been derived from visual research in branches with them present and logical conclusions. | |||
* Fixing parameter caveats when they don't break visual consistency. | |||
: Dozens of broken parameter combinations are fixed with LUX. | |||
: LUX has a habit of magically fixing things we didn't even know were broken on stock. | |||
: If there is a broken combination or a caveat that isn't fixed, make a github issue ( please check if it's broken on LUX first ) | |||
= | = Features = | ||
Some Features from these Branches have been implemented: | |||
*{{asbranch|4.1}} | *{{asbranch|4.1}} | ||
*{{l4dbranch|4.1}} | *{{l4dbranch|4.1}} | ||
*{{csgobranch|4.1}} | *{{csgobranch|4.1}} | ||
:{{note|Code from {{asbranch|4.1}} is heavily adapted, cross-referencing may be difficult.}} | |||
:{{warning|Features that couldn't be made with code reference will be prone to visual disparity.}} | |||
:{{ | |||
: {{ | |||
* [[$phong#Brightness|$phongdisablehalflambert]] from {{asbranch|4.1}}. | |||
* {{Ent|$lightmap}} from {{src13mp|4.1}}. | |||
* Spline Rope Support from {{asbranch|4.1}}. | |||
* Radial Fog. Originally taken from {{mapbase|4.1}}. However {{src13mp|4.1}} also has the code for this, since TF2SDK. | |||
* [[Parallax Corrected Cubemaps]] from {{mapbase|4.1}}. Has identical parameter names to Mapbases, allow its vBSP to be used. | |||
* Brush {{Ent|$phong}} ( Original Implementation/Feature ) | |||
* $Treesway from {{asbranch|4.1}}. However {{src13mp|4.1}} also has the code for this, since TF2SDK. | |||
* [[$phong#Masking|$phongexponentfactor]] from {{src13mp|4.1}}. | |||
* [[$phong#Masking|$basemapluminancephongmask]] from {{asbranch|4.1}}. | |||
* [[$phong#Colors|$phongalbedoboost]] - Logically adapted. {{csgo|since}} | |||
* Rec. 709 HDTV Luminance Weights. <code>float3(0.2126f, 0.7152f, 0.0722f)</code> usable via lux_luminanceweights. | |||
* [[Glowing_Textures#.24selfillum|$selfillumtexture]] for VertexLitGeneric. Deprecated since {{src07|4.1}}, works identical to $DetailBlendMode 5. | |||
* Water {{Ent|$flowmap}} support from {{as|4.1}}. | |||
* {{Ent|$envmaplightscale}} for brushes and models. From {{as|since}} ( Brushes ) and adapted for models {{csgo|only}}. | |||
* {{Ent|$envmapsphere}} for VertexLitGeneric without $BumpMap and $Phong. ( Has a lot of Caveats ) | |||
* $ReceiveFlashlight for all Shaders ( Original Implementation/Feature ) | |||
* $NoTint and $AllowDiffuseModulation ( From {{as|4.1}} and {{csgo|4.1}}. Logically derived ) | |||
* 'Infected' Shader {{l4d|4.1}}. ( Created from publically available Information ) | |||
* 'Black' Shader {{l4d|since}}. ( Original Implementation/Feature ) | |||
* .. | |||
= Features that aren't planned to be supported = | |||
* [[$bumpmap#Additional_Parameters|$bumpmask]] | |||
* $basealphaenvmapmaskminmaxexp from {{as|4.1}} | |||
* $EnvMapLightScaleMinMax from {{csgo|4.1}} - No publically available code and it works a bit whacky? | |||
* .. | |||
= Resolved Caveats = | |||
: | * {{Ent|$bumpmap}} + {{Ent|$envmapmask}}. Used to be {{only|{{csgo}}}} and {{only|{{mapbase}}}} | ||
* [[$detail#Parameters and Effects|$detailblendmode]] 0-9 and 11 now supported on VertexLitGeneric, LightmappedGeneric and WorldVertexTransition | |||
* [[$detail#Parameters and Effects|$detailblendmode]] 10 now supports $SSBump. {{only|{{p2}}}} | |||
* {{Ent|$lightwarptexture}} + {{Ent|$detail}}. Doesn't work in {{tf2||4.1}} and {{as||4.1}} | |||
* {{Ent|$basealphaenvmapmask}} + {{Ent|bumpmap}} now supported on VertexLitGeneric. | |||
* {{Ent|$blendtintbybasealpha}} for LightmappedGeneric and WorldVertexTransition. | |||
* [[Glowing_Textures#.24selfillum|$selfillummask]] now supported on some Shaders that didn't have it previously. | |||
* For Main Shaders, all Transform Parameters can now work unattached to one another. | |||
* WVT Now supports separate Transforms for: Base, Base2, Bump, Bump2, Detail, Detail2, EnvMapMask, EnvMapMask2, BlendModulate | |||
* EnvMapMasks can now manually be flipped using $EnvMapMaskFlip. This is also used to reproduce stock behaviours. | |||
* {{Ent|$selfillum_envmapmask_alpha}} previously not on some main shaders in {{src13|not}} | |||
* [[$phong#Masking|$invertphongmask]]{{as}}{{src13}} flips only the EnvMapMask on Stock. LUX solves this with $PhongNewBehaviour. | |||
* [[$phong#Colors|$phongalbedotint]] can now be used without [[$phong#Masking|$phongexponenttexture]]. | |||
* [[$phong#Colors|$phongalbedoboost]]{{only|{{csgo}}}} and {{Ent|$detail}} can now be used together. | |||
* [[$phong#Colors|$phongtint]] does not disable [[$phong#Colors|$phongalbedotint]] anymore. | |||
* $PhongFlatNormal introduced to override [[$phong#Masking|$basemapalphaphongmask]] behaviour of forcing a flat normal. ( Disabling the Normal Map ) | |||
* Many Phong Issues have been resolved. To keep visual consistency with stock shaders, $PhongNewBehaviour has been introduced that disables broken behaviours. | |||
* {{Ent|$lightwarptexture}} can now be used on VertexLitGeneric without forcing BumpMapping, using $LightWarpNoBump. | |||
* [[$detail#Parameters and Effects|$detailblendmode]] 5 and 6 on $BumpMap'd VertexLitGeneric. | |||
* .. Many.. MANY more Issues have been resolved. Simply too many to list here. | |||
= History = | |||
{{LUX|4.1}} started development on January 20th, 2023. Plans for it were made around January 14th.<br> | |||
Even before 2023, the idea of rewriting Valve's shaders was being considered, due to constant modification requests.<br> | |||
Requests are most commonly denied due to stock shader limitations, artificial complexity and long development times. | |||
= See also = | |||
* {{LUX|4.1}} [https://discord.gg/cGv8GGSkpc Discord] Server | * {{LUX|4.1}} [https://discord.gg/cGv8GGSkpc Discord] Server | ||
: Development can be followed here | : Development can be followed here. | ||
: It is also intended as a general place for discussing | : It is also intended as a general place for discussing source related Shader-Modding. | ||
* {{LUX|4.1}} [https://github.com/ | * {{LUX|4.1}} [https://github.com/LUX-Shaders-Team/LUX-Shaders-Issues GitHub Issues] Page. | ||
: For Bug-Reports & Suggestions. | |||
{{ | * {{LUX|4.1}} [https://github.com/LUX-Shaders-Team/LUX-Shaders Public GitHub Repository] Page | ||
: The public repository that will hold the code once the project releases. |
Latest revision as of 02:56, 17 October 2025
LUX | |
---|---|
![]() | |
Wiki | |
Type | Modification |
Developers | ShiroDkxtro2 |
Engine | ![]() |
Platforms | ![]() ![]() ![]() |
Based on | ![]() |
LUX is a mod made for
Source 2013 Singleplayer and
Source 2013 Multiplayer.
The goal of the Project is a reevaluated and rewritten set of shaders, that are faster to compile, easier to debug and modify.
It resolves caveats and introduces new features, sometimes replicating those from newer source branches.
The shaders are not designed to boost performance, don't expect superficial increases in fps.
LUX can serve as a drop-in replacement to the shaders from Mapbase.
Although it references Alien Swarm Code, the branch itself is not supported.
Similarly, macOS is not supported.
LUX is based on publicly available code and has a strict no leaked-code policy.
Goals
- Total Overhaul of the
materialsystem\
folder
- Implementing
LUX is intended to be as easy as possible. To ensure this, changes are restricted to the
materialsystem\
folder. - Using Code from the Orange Box and Alien Swarm,
materialsystem\shaderlib
has been added back in and is used to implement new features. - Previously LUX was limited to the
materialsystem\stdshaders
folder. Now it'smaterialsystem\
to allow for this.
- Faster compile times for all Shaders
- All shaders have been rewritten from scratch and the systems they use have been reevaluated.
- Due to this, all shaders in the project can be compiled in about 15 minutes on dated hardware.
- For newer Hardware ( r9 5950x ), you may see times as low as two minutes.
- Various shaders now have their own .bat scripts. Making it easier to develop individual shaders.
- This means modding specific shaders ( such as VertexLitGeneric ) is much faster.
- Now changing a header does not mean having to 'recompile the universe'
- Compatability with
Mapbase
LUX intends to serve as a drop-in replacement for Mapbase Shaders
- Thus it has features such as Parallax Corrected Cubemaps ( and much more.. radial fog, non-location specific Core Shader, .. )
- To facilitate this, every SDK_ Prefixed Shader will fallback to LUX_
- Stock Shader replacement
LUX allows for the selective replacement of existing shaders on
Source 2013 Multiplayer.
- Using Various other methods such as memory patching or material passthrough this may also be used on
Source 2013 Singleplayer
- Shadermodel 3.0 only
- To allow for many of the new features, all of the Shaders use Shadermodel 3.0.
- A limitation created by this is that Linux on
Source 2013 Singleplayer cannot run LUX, since ToGL does not have support for it,
- DXVK may serve as an alternative here for Linux Users.
- 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 either.
- Drastically more documentation, including their parameters, how they work and any possible caveats
- Due to the Development of
LUX, Articles on the VDC such as $lightwarptexture, $detail, UnlitTwoTexture and $envmapmask
- received massive updates, filling them with information about caveats and bugs.
- LUX shaders themselves have many comments, notifying when the behaviour of stock shaders has to be considered to keep visual consistency.
- A Github Wiki listing all shader parameters and all shaders in the project is in the works.
- Helper strings have been added to all parameters and can be read back via the in-game console as well.
- Implementing features unavailable to
Source 2013
- This includes old features such as $selfillumtexture and newer features like $phongalbedoboost(only in
).
- Note that LUX is not made from leaked code. Features (such as $SSBumpMathFix) have been derived from visual research in branches with them present and logical conclusions.
- Fixing parameter caveats when they don't break visual consistency.
- Dozens of broken parameter combinations are fixed with LUX.
- LUX has a habit of magically fixing things we didn't even know were broken on stock.
- If there is a broken combination or a caveat that isn't fixed, make a github issue ( please check if it's broken on LUX first )
Features
Some Features from these Branches have been implemented:
Note:Code from
Alien Swarm engine branch is heavily adapted, cross-referencing may be difficult.
Warning:Features that couldn't be made with code reference will be prone to visual disparity.
- $phongdisablehalflambert from
Alien Swarm engine branch.
- $lightmap from
Source 2013 Multiplayer.
- Spline Rope Support from
Alien Swarm engine branch.
- Radial Fog. Originally taken from
Mapbase. However
Source 2013 Multiplayer also has the code for this, since TF2SDK.
- Parallax Corrected Cubemaps from
Mapbase. Has identical parameter names to Mapbases, allow its vBSP to be used.
- Brush $phong ( Original Implementation/Feature )
- $Treesway from
Alien Swarm engine branch. However
Source 2013 Multiplayer also has the code for this, since TF2SDK.
- $phongexponentfactor from
Source 2013 Multiplayer.
- $basemapluminancephongmask from
Alien Swarm engine branch.
- $phongalbedoboost - Logically adapted. (in all games since
)
- Rec. 709 HDTV Luminance Weights.
float3(0.2126f, 0.7152f, 0.0722f)
usable via lux_luminanceweights. - $selfillumtexture for VertexLitGeneric. Deprecated since
Source 2007, works identical to $DetailBlendMode 5.
- Water $flowmap support from
Alien Swarm.
- $envmaplightscale for brushes and models. From (in all games since
) ( Brushes ) and adapted for models (only in
).
- $envmapsphere for VertexLitGeneric without $BumpMap and $Phong. ( Has a lot of Caveats )
- $ReceiveFlashlight for all Shaders ( Original Implementation/Feature )
- $NoTint and $AllowDiffuseModulation ( From
Alien Swarm and
Counter-Strike: Global Offensive. Logically derived )
- 'Infected' Shader
Left 4 Dead. ( Created from publically available Information )
- 'Black' Shader (in all games since
). ( Original Implementation/Feature )
- ..
Features that aren't planned to be supported
- $bumpmask
- $basealphaenvmapmaskminmaxexp from
Alien Swarm
- $EnvMapLightScaleMinMax from
Counter-Strike: Global Offensive - No publically available code and it works a bit whacky?
- ..
Resolved Caveats
- $bumpmap + $envmapmask. Used to be (only in
) and (only in
)
- $detailblendmode 0-9 and 11 now supported on VertexLitGeneric, LightmappedGeneric and WorldVertexTransition
- $detailblendmode 10 now supports $SSBump. (only in
)
- $lightwarptexture + $detail. Doesn't work in
and
- $basealphaenvmapmask + bumpmap now supported on VertexLitGeneric.
- $blendtintbybasealpha for LightmappedGeneric and WorldVertexTransition.
- $selfillummask now supported on some Shaders that didn't have it previously.
- For Main Shaders, all Transform Parameters can now work unattached to one another.
- WVT Now supports separate Transforms for: Base, Base2, Bump, Bump2, Detail, Detail2, EnvMapMask, EnvMapMask2, BlendModulate
- EnvMapMasks can now manually be flipped using $EnvMapMaskFlip. This is also used to reproduce stock behaviours.
- $selfillum_envmapmask_alpha previously not on some main shaders in (not in
)
- $invertphongmask
flips only the EnvMapMask on Stock. LUX solves this with $PhongNewBehaviour.
- $phongalbedotint can now be used without $phongexponenttexture.
- $phongalbedoboost(only in
) and $detail can now be used together.
- $phongtint does not disable $phongalbedotint anymore.
- $PhongFlatNormal introduced to override $basemapalphaphongmask behaviour of forcing a flat normal. ( Disabling the Normal Map )
- Many Phong Issues have been resolved. To keep visual consistency with stock shaders, $PhongNewBehaviour has been introduced that disables broken behaviours.
- $lightwarptexture can now be used on VertexLitGeneric without forcing BumpMapping, using $LightWarpNoBump.
- $detailblendmode 5 and 6 on $BumpMap'd VertexLitGeneric.
- .. Many.. MANY more Issues have been resolved. Simply too many to list here.
History
LUX started development on January 20th, 2023. Plans for it were made around January 14th.
Even before 2023, the idea of rewriting Valve's shaders was being considered, due to constant modification requests.
Requests are most commonly denied due to stock shader limitations, artificial complexity and long development times.
See also
- Development can be followed here.
- It is also intended as a general place for discussing source related Shader-Modding.
LUX GitHub Issues Page.
- For Bug-Reports & Suggestions.
- The public repository that will hold the code once the project releases.