Zh/LUX: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
mNo edit summary
m (Multipage removal)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{lang|LUX|title=LUX}}
{{LanguageBar}}
 
{{Infotable
{{infotable
| state = 5
|state=5
| ownwiki = https://github.com/ShiroDkxtro2/ACROHS-LUX_-Shaders-Project/wiki
|ownwiki=https://github.com/ShiroDkxtro2/ACROHS-LUX_-Shaders-Project/wiki
| type = m0
|type=m0
| dev = [[User:ShiroDkxtro2|ShiroDkxtro2]]
|dev=[[User:ShiroDkxtro2|ShiroDkxtro2]]
| engine = 2
|engine=2
| base = {{src13|4}}
|base={{src13|4}}
| platform = {{only|{{PC|4}}}}
|platform={{only|PC}}
| github = ShiroDkxtro2/ACROHS-LUX_-Shaders-Project
|github=ShiroDkxtro2/ACROHS-LUX_-Shaders-Project
| discord = https://discord.gg/cGv8GGSkpc
|discord=https://discord.gg/cGv8GGSkpc
}}
}}


{{LUX|4}}是一个专门为{{src13sp|4}}和{{src13mp|4}}制作和开发的模组,其目的皆在为完全重写所有原版和{{mapbase|4}}的着色器
{{LUX|4}}是一个专门为{{src13sp|4}}和{{src13mp|4}}制作和开发的模组,其目的皆在为完全重写所有原版和{{Mapbase|4}}的着色器


==目标==
==目标==
* '''大修\清理<code>materialsystem\stdshaders\</code>目录'''
* '''大修\清理<code>materialsystem\stdshaders\</code>目录'''
:{{warning:zh-cn|除了现有的着色器编译功能外,几乎所有的东西都被“扬了”。}}
: {{Warning|除了现有的着色器编译功能外,几乎所有的东西都被“扬了”。}}
:{{notice:zh-cn|实现{{LUX|2}}的着色器需要将<code>stdshaders/</code>替换为{{LUX|2}}自己的,这“有效”的扬了所有原版着色器的修改版,LUX应该能够实现所有{{src13}}和{{Mapbase}}着色器原有的功能}}
: {{Notice|实现{{LUX|2}}的着色器需要将<code>stdshaders/</code>替换为{{LUX|2}}自己的,这“有效”的扬了所有原版着色器的修改版,LUX应该能够实现所有{{src13}}和{{Mapbase}}着色器原有的功能}}
::{{note:zh-cn|SDK着色器会自动回退到对应的{{LUX|2}}版本,这样使用{{Mapbase|4}}的模组无需太多改动就可以使用LUX}}
::{{Note|SDK着色器会自动回退到对应的{{LUX|2}}版本,这样使用{{Mapbase|4}}的模组无需太多改动就可以使用LUX}}
* '''大幅减少所有着色器的编译时间'''
* '''大幅减少所有着色器的编译时间'''
:{{why:zh-cn|在{{src13sp}}{{src13mp}}{{as}},V社的着色器需要'''非常长'''的时间进行编译。尤其是在使用原版编译器的情况下。这限制了着色器的修改}}
: {{Why|在{{src13sp}}{{src13mp}}{{as}},V社的着色器需要'''非常长'''的时间进行编译。尤其是在使用原版编译器的情况下。这限制了着色器的修改}}
:{{notice:zh-cn|即便使用高端CPU也至少需要半天'''或更久'''的时间进行编译。以{{LUX|2}}为例,在4核@4.1Hz环境下编译整个LUX_Lightmappedgeneric仅需要大约30秒}}
: {{Notice|即便使用高端CPU也至少需要半天'''或更久'''的时间进行编译。以{{LUX|2}}为例,在4核@4.1Hz环境下编译整个LUX_Lightmappedgeneric仅需要大约30秒}}
* '''着色器仅使用SM 3.0'''
* '''着色器仅使用SM 3.0'''
:{{why:zh-cn|ps20b及以下有太多限制。缺少可用的常量寄存器会导致极端分支和大量“组合”。使代码变成一坨难以阅读和理解的屎山。这会抑制模组制作者的积极性。}}
: {{Why|ps20b及以下有太多限制。缺少可用的常量寄存器会导致极端分支和大量“组合”。使代码变成一坨难以阅读和理解的屎山。这会抑制模组制作者的积极性。}}
:{{note:zh-cn|SM3.0于2004年发布,[https://cdn.cloudflare.steamstatic.com/apps/valve/2010/siggraph2010_vlachos_waterflow.pdf V社在2008年考虑到了ps2.0及以下的低端硬件]。详见幻灯片第8页}}
: {{Note|SM3.0于2004年发布,[https://cdn.cloudflare.steamstatic.com/apps/valve/2010/siggraph2010_vlachos_waterflow.pdf V社在2008年考虑到了ps2.0及以下的低端硬件]。详见幻灯片第8页}}
:{{note:zh-cn|这意味着不支持SM3.0的低端硬件将无法使用新的着色器}}
: {{Note|这意味着不支持SM3.0的低端硬件将无法使用新的着色器}}
:{{notice:zh-cn|Linux和MacOS暂无官方支持。以上系统用户需要使用<code>togl</code>进行补丁才能使用SM3.0,或使用DXVK}}
: {{Notice|Linux和MacOS暂无官方支持。以上系统用户需要使用<code>togl</code>进行补丁才能使用SM3.0,或使用DXVK}}
* '''完全重写.h, .cpp, .fxc文件'''
* '''完全重写.h, .cpp, .fxc文件'''
* '''更多有关着色器、自身参数、如何工作以及任何可能的注意事项的文档'''
* '''更多有关着色器、自身参数、如何工作以及任何可能的注意事项的文档'''
:{{notice:zh-cn|你可能已经注意到了如{{ent|$lightwarptexture}}、{{ent|$detail}}、{{ent|UnlitTwoTexture}}、{{ent|$envmapmask}}得到了由[[User:ShiroDkxtro2|ShiroDkxtro2]]贡献的重大更新
: {{Notice|你可能已经注意到了如{{Ent|$lightwarptexture}}、{{Ent|$detail}}、{{Ent|UnlitTwoTexture}}、{{Ent|$envmapmask}}得到了由[[User:ShiroDkxtro2|ShiroDkxtro2]]贡献的重大更新
:他为{{tf2}}{{as}}{{src13}}{{csgo}}添加了新的注意事项和bug记录。这些文档是{{LUX|2}}开发的直接结果,尽管开发的重点集中在{{src13}}{{as}}上,因为他们是开源项目}}
: 他为{{tf2}}{{as}}{{src13}}{{csgo}}添加了新的注意事项和bug记录。这些文档是{{LUX|2}}开发的直接结果,尽管开发的重点集中在{{src13}}{{as}}上,因为他们是开源项目}}
:{{note:zh-cn|目前缺少有关着色器如何在起源中工作的文档,这导致起源的图形学领域门槛很高,需要有大量的相关经验,阻碍了模组制作者们修改着色器和创作自己的}}
: {{Note|目前缺少有关着色器如何在起源中工作的文档,这导致起源的图形学领域门槛很高,需要有大量的相关经验,阻碍了模组制作者们修改着色器和创作自己的}}
* '''实现{{src13}}没有的内容'''
* '''实现{{src13}}没有的内容'''
:{{Seealso:zh-cn| <code>计划实现的功能</code>. 这个目标包含了例如[[Glowing_Textures#.24selfillum|$selfillumtexture]]的旧功能和例如[[$phong#Colors|$phongalbedoboost]]{{only|csgo}}的新功能}}
: {{Seealso| <code>计划实现的功能</code>. 这个目标包含了例如[[Glowing_Textures#.24selfillum|$selfillumtexture]]的旧功能和例如[[$phong#Colors|$phongalbedoboost]]{{only|csgo}}的新功能}}
* '''修复大多数参数的Bug和警告'''
* '''修复大多数参数的Bug和警告'''
:{{Seealso:zh-cn| <code>原版着色器与LUX着色器对比</code>}}
: {{Seealso| <code>原版着色器与LUX着色器对比</code>}}
* '''禁用特定功能的简单方法''' <!--原文为It automatically sets <code>// STATIC:</code>'s to predefined values depending on <code>#define</code>'s in an included header file,出于通俗目的进行修改-->
* '''禁用特定功能的简单方法''' <!--原文为It automatically sets <code>// STATIC:</code>'s to predefined values depending on <code>#define</code>'s in an included header file,出于通俗目的进行修改-->
:{{note:zh-cn|已制作一个自定义的预处理程序,可以通过禁用不需要的功能来使着色器编译的更快}}
: {{Note|已制作一个自定义的预处理程序,可以通过禁用不需要的功能来使着色器编译的更快}}
* '''对Mapbase的兼容性'''
* '''对Mapbase的兼容性'''
:{{notice:zh-cn|要替换其他mod(如Source 2013社区版,以Mapbase为本体的mod)修改的原版着色器,应该和直接替换<code>stdshaders\</code>目录一样简单}}
: {{Notice|要替换其他mod(如Source 2013社区版,以Mapbase为本体的mod)修改的原版着色器,应该和直接替换<code>stdshaders\</code>目录一样简单}}
:{{note:zh-cn| 以上假定除修改的原版着色器外无其他的自定义着色器,但如果确实有,开发者应该能将它们添加回来,因为这是添加自定义着色器的先决条件}}
: {{Note| 以上假定除修改的原版着色器外无其他的自定义着色器,但如果确实有,开发者应该能将它们添加回来,因为这是添加自定义着色器的先决条件}}


==计划实现的功能==
==计划实现的功能==
这是正在实施的新功能列表,或者将从较新的引擎分支移植/复刻的功能,例如{{as}}{{l4d2}}{{csgo}}
这是正在实施的新功能列表,或者将从较新的引擎分支移植/复刻的功能,例如{{as}}{{l4d2}}{{csgo}}
{{note:zh-cn|该语境下的被移植“对象”通常指{{as|4}}{{mapbase|4}},但在多数情况下,其代码会出于简化或大修的目的而进行大量修改}}
{{Note|该语境下的被移植“对象”通常指{{as|4}}{{Mapbase|4}},但在多数情况下,其代码会出于简化或大修的目的而进行大量修改}}
{{important:zh-cn|{{LUX|2}}'''不使用'''''任何''的泄露代码。像[[$phong#Colors|$phongalbedoboost]]{{only|csgo}}这样的功能不是什么难以实现的东西,它们可以在不使用泄露代码的情况下安全的复现}}
{{Important|{{LUX|2}}'''不使用'''''任何''的泄露代码。像[[$phong#Colors|$phongalbedoboost]]{{only|csgo}}这样的功能不是什么难以实现的东西,它们可以在不使用泄露代码的情况下安全的复现}}
:{{warning:zh-cn|对于更复杂的功能,与V社的实现方法相比可能存在视觉差异。}}
: {{Warning|对于更复杂的功能,与V社的实现方法相比可能存在视觉差异。}}


====出于{{mapbase|4}}兼容性而需实现的功能====
====出于{{Mapbase|4}}兼容性而需实现的功能====
* 来自{{as}}的[[$phong#Brightness|$phongdisablehalflambert]]+
* 来自{{as}}的[[$phong#Brightness|$phongdisablehalflambert]]+
* 所有“几何”用着色器的径向雾
* 所有“几何”用着色器的径向雾
* Spline-Ropes
* Spline-Ropes
* [[Parallax Corrected Cubemaps|视差修正反射贴图]]
* {{L|Parallax Corrected Cubemaps|视差修正反射贴图}}
:{{note:zh-cn|就像{{mapbase|4}}一样,视差反射需要自定义的地图编译器}}
: {{Note|就像{{Mapbase|4}}一样,视差反射需要自定义的地图编译器}}
:{{important:zh-cn|{{LUX}}和{{mapbase}}参数是一样的,所以Mapbase的地图编译器也可以使用}}
: {{Important|{{LUX}}和{{Mapbase}}参数是一样的,所以Mapbase的地图编译器也可以使用}}
* {{ent|VertexLitGeneric}}上同时使用{{ent|$envmapmask|反射遮罩}}和{{ent|$bumpmap|法线贴图}}的支持
* {{Ent|VertexLitGeneric}}上同时使用{{Ent|$envmapmask|反射遮罩}}和{{Ent|$bumpmap|法线贴图}}的支持
* 控制器着色器"Postprocessing"的替代品
* 控制器着色器"Postprocessing"的替代品
* 来自{{as}}的着色器"Engine_post"替代品
* 来自{{as}}的着色器"Engine_post"替代品
* {{ent|$blendmodulatetexture}}的Hammer内预览修复
* {{Ent|$blendmodulatetexture}}的Hammer内预览修复
* 固体用{{ent|$phong|alt=漫反射}}
* 固体用{{Ent|$phong|alt=漫反射}}
* [[$treesway|树叶飘动]]
* {{L|$treesway|树叶飘动}}
:{{todo|这真的是移植自{{as}}的{{mapbase}}功能吗}}
: {{Todo|这真的是移植自{{as}}的{{Mapbase}}功能吗}}


==== 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}} Models utilizing Model Lightmapping can use {{Ent|$bumpmap}}. Additionally all Model shaders will be able to utilize this feature. Except they have {{Ent|$phong}}.
:{{important:zh-cn|The Lightmap does not do bumped-lighting using the bumpmap. Only named-lights/projected textures will be able to do so.}}
: {{Important|The Lightmap does not do bumped-lighting using the bumpmap. Only named-lights/projected textures will be able to do so.}}
:{{note:zh-cn| 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!}}  
: {{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:zh-cn|The way this is currently implemented requires a custom written tool, two smd's ( one with lightmap uv ) and also has a lot of precision loss for the Lightmap UV's. Additionally this requires a custom compiler! }}
: {{Warning|The way this is currently implemented requires a custom written tool, two smd's ( one with lightmap uv ) and also has a lot of precision loss for the Lightmap UV's. Additionally this requires a custom compiler! }}
::{{todo|Investigate {{src07}} code, supposedly the Studiomdl code is there. Maybe it can be packed via Blendweights or alternatively the precision loss might be decreased.}}
:: {{Todo|Investigate {{src07}} code, supposedly the Studiomdl code is there. Maybe it can be packed via Blendweights or alternatively the precision loss might be decreased.}}


==== Features ported/recreated/revived ====
==== Features ported/recreated/revived ====
* [[$phong#Brightness|$phongdisablehalflambert]] From {{as}}+ - Also needed for {{mapbase}}
* [[$phong#Brightness|$phongdisablehalflambert]] From {{as}}+ - Also needed for {{Mapbase}}
* [[$phong#Masking|$phongexponentfactor]] From {{src13mp}}{{tf2}}, with LUX also on {{src13sp}}
* [[$phong#Masking|$phongexponentfactor]] From {{src13mp}}{{tf2}}, with LUX also on {{src13sp}}
* [[$phong#Colors|$phongalbedoboost]] From {{csgo}} - Its just <code>BaseTexture * $PhongAlbedoBoost</code>... No leaked code!
* [[$phong#Colors|$phongalbedoboost]] From {{csgo}} - Its just <code>BaseTexture * $PhongAlbedoBoost</code>... No leaked code!
* [[$phong#Masking|$basemapluminancephongmask]] From {{as}}+
* [[$phong#Masking|$basemapluminancephongmask]] From {{as}}+
:{{note:zh-cn|LUX allows the use of Rec. 709 HDTV Luminance Weights. <code>float3(0.2126f, 0.7152f, 0.0722f)</code>.<br>
: {{Note|LUX 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> }}
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}} - This used to be obsolete
* [[Glowing_Textures#.24selfillum|$selfillumtexture]] Deprecated since {{src07}} - This used to be obsolete
:{{note:zh-cn| 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:zh-cn|PBR Shaders in the community commonly have a $emissiontexture parameter that does EXACTLY what [[Glowing_Textures#.24selfillum|$selfillumtexture]] does in LUX.}}
: {{Seealso|PBR Shaders in the community commonly have a $emissiontexture parameter that does EXACTLY what [[Glowing_Textures#.24selfillum|$selfillumtexture]] does in LUX.}}
* Water Shader with {{ent|$flowmap}} Support - From {{as}}
* Water Shader with {{Ent|$flowmap}} Support - From {{as}}
* {{ent|$envmaplightscale}} From {{as}} for brushes{{as}}+ AND models {{only|{{csgo}}}}+
* {{Ent|$envmaplightscale}} From {{as}} for brushes{{as}}+ AND models {{only|{{csgo}}}}+
:{{important:zh-cn}}
: {{Important}}
:: * On brushes this will use the Lightmap
::* On brushes this will use the Lightmap
:: * On models '''with''' {{ent|$bumpmap}}, this will use bumped lighting.
::* On models '''with''' {{Ent|$bumpmap}}, this will use bumped lighting.
:: * 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, will use the Lightmap. Regardless of whether or not {{ent|$bumpmap}} is used.
::* In {{src13mp}} Models utilizing Model Lightmapping, will use the Lightmap. Regardless of whether or not {{Ent|$bumpmap}} is used.


==== Features that are being discarded ====
==== Features that are being discarded ====
* {{ent|$envmapsphere}} and related - These features have been removed since {{as}} and are obsolete.
* {{Ent|$envmapsphere}} and related - These features have been removed since {{as}} and are obsolete.
:{{note:zh-cn|This is very easy to re-implement. The 7th face of a Cubemap is still being built in {{src13}} and therefore this feature is still operational given that the code has been implemented!}}
: {{Note|This is very easy to re-implement. The 7th face of a Cubemap is still being built in {{src13}} and therefore this feature is still operational given that the code has been implemented!}}
* [[$bumpmap#Additional_Parameters|$bumpmask]] and related
* [[$bumpmap#Additional_Parameters|$bumpmask]] and related


Line 100: Line 99:


==== Not functional - FOR NOW ====
==== Not functional - FOR NOW ====
* {{ent|$emissiveblend}} - Non-Existant. Planned for later.
* {{Ent|$emissiveblend}} - Non-Existant. Planned for later.
* {{ent|$distancealpha}} - Non-Functional. Planned for later.
* {{Ent|$distancealpha}} - Non-Functional. Planned for later.
* {{ent|$ssbump}} - Non-Functional. Planned for later.
* {{Ent|$ssbump}} - Non-Functional. Planned for later.
* [[$detail#Parameters and Effects|$detailblendmode]] <code>10 & 11</code>.  - Non-Functional. Planned for later.
* [[$detail#Parameters and Effects|$detailblendmode]] <code>10 & 11</code>.  - Non-Functional. Planned for later.
<br>
<br>




=Stock Shaders VS LUX=
= Stock Shaders VS LUX =
{{todo|Move This to their own pages or something like that.}}
{{Todo|Move This to their own pages or something like that.}}


== LightMappedGeneric ==
== LightMappedGeneric ==
=== Stock Shader's ===
=== Stock Shader's ===
{{bug|[[$detail#Parameters and Effects|$detailblendmode]]{{src13}}{{tf2}} 2-9 Don't work.}}
{{Bug|[[$detail#Parameters and Effects|$detailblendmode]]{{src13}}{{tf2}} 2-9 Don't work.}}
{{bug|[[$detail#Parameters and Effects|$detailblendmode]]{{as}} 6 Doesn't work.}}
{{Bug|[[$detail#Parameters and Effects|$detailblendmode]]{{as}} 6 Doesn't work.}}
{{bug|[[$detail#Parameters and Effects|$detailblendmode]]{{csgo}} 1-6, 8 Don't work. 9 Does not work with {{ent|$bumpmap}}, {{ent|$envmap}} or {{ent|$selfillum}}}}
{{Bug|[[$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>
<br>
{{bug|{{ent|$bumpmap}} + {{ent|$envmapmask}} Doesn't work, except in {{csgo|4}}}}
{{Bug|{{Ent|$bumpmap}} + {{Ent|$envmapmask}} Doesn't work, except in {{csgo|4}}}}
{{bug|{{ent|$lightwarptexture}} + {{ent|$detail}}{{tf2}}{{as}} Doesn't work}}
{{Bug|{{Ent|$lightwarptexture}} + {{Ent|$detail}}{{tf2}}{{as}} Doesn't work}}
{{bug|{{ent|$basealphaenvmapmask}} + {{ent|bumpmap}} Doesn't work}}
{{Bug|{{Ent|$basealphaenvmapmask}} + {{Ent|bumpmap}} Doesn't work}}
<br>
<br>
{{note:zh-cn|[[Glowing_Textures#.24selfillum|$selfillummask]] Missing}}
{{Note|[[Glowing_Textures#.24selfillum|$selfillummask]] Missing}}
{{note:zh-cn|{{ent|$selfillum_envmapmask_alpha}} Missing}}
{{Note|{{Ent|$selfillum_envmapmask_alpha}} Missing}}
{{note:zh-cn|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] Missing}}
{{Note|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] Missing}}
{{note:zh-cn|{{ent|$blendtintbybasealpha}} Missing}}
{{Note|{{Ent|$blendtintbybasealpha}} Missing}}
{{note:zh-cn|[[$detail#Parameters and Effects|$detailtexturetransform]] Missing}}
{{Note|[[$detail#Parameters and Effects|$detailtexturetransform]] Missing}}
{{note:zh-cn|{{ent|$lightwarptexture}}{{csgo}} Missing}}
{{Note|{{Ent|$lightwarptexture}}{{csgo}} Missing}}
{{note:zh-cn|{{ent|$envmapfresnelminmaxexp}}{{only|{{l4d}}+}}}}
{{Note|{{Ent|$envmapfresnelminmaxexp}}{{only|{{l4d}}+}}}}
{{note:zh-cn|{{ent|$envmaplightscale}}{{only|{{as}}+}}}}
{{Note|{{Ent|$envmaplightscale}}{{only|{{as}}+}}}}
{{notice:zh-cn|{{ent|$basealphaenvmapmask}} requires inverted masks}}
{{Notice|{{Ent|$basealphaenvmapmask}} requires inverted masks}}


=== LUX_LightMappedGeneric ===
=== LUX_LightMappedGeneric ===
* [[$detail#Parameters and Effects|$detailblendmode]] 1-9 works.
* [[$detail#Parameters and Effects|$detailblendmode]] 1-9 works.
* [[$detail#Parameters and Effects|$detailblendmode]] 10-11 planned.
* [[$detail#Parameters and Effects|$detailblendmode]] 10-11 planned.
* {{ent|$bumpmap}} + {{ent|$envmapmask}} works, used to be {{only|{{csgo}}.}}
* {{Ent|$bumpmap}} + {{Ent|$envmapmask}} works, used to be {{only|{{csgo}}.}}
* {{ent|$lightwarptexture}} + {{ent|$detail}} works ( does not work in {{as}}{{tf2}} ).
* {{Ent|$lightwarptexture}} + {{Ent|$detail}} works ( does not work in {{as}}{{tf2}} ).
* {{ent|$basealphaenvmapmask}} + {{ent|$bumpmap}} works.
* {{Ent|$basealphaenvmapmask}} + {{Ent|$bumpmap}} works.
* [[Glowing_Textures#.24selfillum|$selfillummask]] Exists now.
* [[Glowing_Textures#.24selfillum|$selfillummask]] Exists now.
* {{ent|$blendtintbybasealpha}} Exists now.
* {{Ent|$blendtintbybasealpha}} Exists now.
* {{ent|$selfillum_envmapmask_alpha}} Exists now.
* {{Ent|$selfillum_envmapmask_alpha}} Exists now.
* [[$detail#Parameters and Effects|$detailtexturetransform]] Exists now.
* [[$detail#Parameters and Effects|$detailtexturetransform]] Exists now.
::{{notice:zh-cn|Caveat - Has higher priority than [[Glowing_Textures#.24selfillum|$selfillum]]/[[Glowing_Textures#.24selfillum|$selfillummask]].}}
::{{Notice|Caveat - Has higher priority than [[Glowing_Textures#.24selfillum|$selfillum]]/[[Glowing_Textures#.24selfillum|$selfillummask]].}}
:::{{notice:zh-cn|Caveat - [[Glowing_Textures#.24selfillum|$selfillumtexture]] has higher priority than both.}}
:::{{Notice|Caveat - [[Glowing_Textures#.24selfillum|$selfillumtexture]] has higher priority than both.}}
:{{important:zh-cn|{{ent|$basealphaenvmapmask}} does no longer require a flipped mask.}}
: {{Important|{{Ent|$basealphaenvmapmask}} does no longer require a flipped mask.}}
::{{workaround|Materials that previously used have to be adjusted. Use {{ent|$envmapmask}} or {{ent|$normalmapalphaenvmapmask}} instead! }}
::{{workaround|Materials that previously used have to be adjusted. Use {{Ent|$envmapmask}} or {{Ent|$normalmapalphaenvmapmask}} instead! }}


== VertexLitGeneric ==
== VertexLitGeneric ==
=== Stock Shader's ===
=== Stock Shader's ===
==== Always ====
==== Always ====
{{ent|$envmaplightscale}}{{only|{{csgo}}}}.
{{Ent|$envmaplightscale}}{{only|{{csgo}}}}.
==== Without $Bumpmap ====
==== Without $Bumpmap ====
{{bug|[[$detail#Parameters and Effects|$detailblendmode]]{{src13}}{{tf2}}{{as}}{{csgo}} 10-11 Don't work.}}
{{Bug|[[$detail#Parameters and Effects|$detailblendmode]]{{src13}}{{tf2}}{{as}}{{csgo}} 10-11 Don't work.}}
{{bug|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] missing.}}
{{Bug|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] missing.}}
{{bug|{{ent|$lightwarptexture}} missing.}}
{{Bug|{{Ent|$lightwarptexture}} missing.}}
:{{note:zh-cn|$lightwarptexture fores bumpmapping by binding a default one, unless one is manually specified.}}
: {{Note|$lightwarptexture fores bumpmapping by binding a default one, unless one is manually specified.}}


==== '''With''' $Bumpmap ====
==== '''With''' $Bumpmap ====
{{bug|[[$detail#Parameters and Effects|$detailblendmode]]{{src13}}{{tf2}}{{as}}{{csgo}} 5-11 Don't work.}}
{{Bug|[[$detail#Parameters and Effects|$detailblendmode]]{{src13}}{{tf2}}{{as}}{{csgo}} 5-11 Don't work.}}
{{bug|[[$detail#Parameters and Effects|$detailblendmode]]{{csgo}} 5-6 & 8-11 Don't work.}}
{{Bug|[[$detail#Parameters and Effects|$detailblendmode]]{{csgo}} 5-6 & 8-11 Don't work.}}
{{note:zh-cn|{{ent|$envmapmask}} missing. Except {{mapbase}}.}}
{{Note|{{Ent|$envmapmask}} missing. Except {{Mapbase}}.}}
{{note:zh-cn|[[Glowing_Textures#.24selfillum|$selfillummask]] missing. {{confirm|Only in {{mapbase}}?}}}}
{{Note|[[Glowing_Textures#.24selfillum|$selfillummask]] missing. {{confirm|Only in {{Mapbase}}?}}}}
{{note:zh-cn|{{ent|$selfillum_envmapmask_alpha}}{{mapbase}} missing.}}
{{Note|{{Ent|$selfillum_envmapmask_alpha}}{{Mapbase}} missing.}}
{{bug|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] disables {{ent|$normalmapalphaenvmapmask}}. {{todo|Also on other branches than {{as}}?}}}}
{{Bug|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] disables {{Ent|$normalmapalphaenvmapmask}}. {{Todo|Also on other branches than {{as}}?}}}}


==== With $Phong ====
==== With $Phong ====
{{bug|[[$detail#Parameters and Effects|$detailblendmode]]{{src13}}{{tf2}}{{as}}{{csgo}} 8-11 Don't work.}}
{{Bug|[[$detail#Parameters and Effects|$detailblendmode]]{{src13}}{{tf2}}{{as}}{{csgo}} 8-11 Don't work.}}
{{bug|[[$phong#Masking|$invertphongmask]]{{as}}{{src13}} In the shadercode, only flips the mask used for {{ent|$envmap}}. {{confirm|Also on newer branches?}}}}
{{Bug|[[$phong#Masking|$invertphongmask]]{{as}}{{src13}} In the shadercode, only flips the mask used for {{Ent|$envmap}}. {{confirm|Also on newer branches?}}}}
{{bug|[[$phong#Colors|$phongalbedotint]] cannot be used without [[$phong#Masking|$phongexponenttexture]].}}
{{Bug|[[$phong#Colors|$phongalbedotint]] cannot be used without [[$phong#Masking|$phongexponenttexture]].}}
{{bug|{{ent|$phongwarptexture}}{{l4d2}} does not work.}}
{{Bug|{{Ent|$phongwarptexture}}{{l4d2}} does not work.}}
{{bug|[[$phong#Colors|$phongalbedoboost]]{{only|{{csgo}}}} + {{ent|$detail}} does not work.}}
{{Bug|[[$phong#Colors|$phongalbedoboost]]{{only|{{csgo}}}} + {{Ent|$detail}} does not work.}}
{{bug|[[$phong#Colors|$phongtint]] disables [[$phong#Colors|$phongalbedotint]].}}
{{Bug|[[$phong#Colors|$phongtint]] disables [[$phong#Colors|$phongalbedotint]].}}
{{bug|{{ent|$envmap}} always masked by something.}}
{{Bug|{{Ent|$envmap}} always masked by something.}}
{{bug|Only in {{l4d}}+ {{ent|$envmap}} masked by {{ent|$basetexture}} luminance when {{ent|$normalmapalphaenvmapmask}} and [[$phong#Masking|$basemapluminancephongmask]] is used.}}
{{Bug|Only in {{l4d}}+ {{Ent|$envmap}} masked by {{Ent|$basetexture}} luminance when {{Ent|$normalmapalphaenvmapmask}} and [[$phong#Masking|$basemapluminancephongmask]] is used.}}
{{bug|{{ent|$envmap}} masked by {{ent|$basetexture}} alpha when {{ent|$normalmapalphaenvmapmask}} and [[$phong#Masking|$basemapalphaphongmask]] is used.}}
{{Bug|{{Ent|$envmap}} masked by {{Ent|$basetexture}} alpha when {{Ent|$normalmapalphaenvmapmask}} and [[$phong#Masking|$basemapalphaphongmask]] is used.}}
{{bug|[[$phong#Masking|$basemapalphaphongmask]] makes {{ent|$phong}} ignore the {{ent|$bumpmap}}.}}
{{Bug|[[$phong#Masking|$basemapalphaphongmask]] makes {{Ent|$phong}} ignore the {{Ent|$bumpmap}}.}}
{{bug|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] + {{ent|$normalmapalphaenvmapmask}} will cause the {{ent|$envmap}} to be multiplied by <code>0.0f</code> regardless of whether [[$phong#Masking|$invertphongmask]] is used.}}
{{Bug|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] + {{Ent|$normalmapalphaenvmapmask}} will cause the {{Ent|$envmap}} to be multiplied by <code>0.0f</code> regardless of whether [[$phong#Masking|$invertphongmask]] is used.}}
{{bug|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] will cause {{ent|$envmap}} to be masked using the {{ent|$basetexture}} alpha channel}}
{{Bug|[[Glowing_Textures#.24selfillum|$selfillumfresnel]] will cause {{Ent|$envmap}} to be masked using the {{Ent|$basetexture}} alpha channel}}
{{note:zh-cn|[[$phong#Brightness|$phongdisablehalflambert]] only in {{as}}+}}
{{Note|[[$phong#Brightness|$phongdisablehalflambert]] only in {{as}}+}}
{{note:zh-cn|[[$phong#Masking|$phongexponentfactor]] only in {{tf2}}{{src13mp}}}}
{{Note|[[$phong#Masking|$phongexponentfactor]] only in {{tf2}}{{src13mp}}}}
{{note:zh-cn|[[$phong#Masking|$basemapluminancephongmask]] only in {{l4d}}+}}
{{Note|[[$phong#Masking|$basemapluminancephongmask]] only in {{l4d}}+}}
{{note:zh-cn|[[$phong#Colors|$phongalbedoboost]] only in {{csgo}}+}}
{{Note|[[$phong#Colors|$phongalbedoboost]] only in {{csgo}}+}}


=== LUX_VertexLitGeneric ===
=== LUX_VertexLitGeneric ===
Line 185: Line 184:
* [[$detail#Parameters and Effects|$detailblendmode]] 10-11 planned. If possible.<br>
* [[$detail#Parameters and Effects|$detailblendmode]] 10-11 planned. If possible.<br>
* [[Glowing_Textures#.24selfillum|$selfillumfresnel]] Exists now.<br>
* [[Glowing_Textures#.24selfillum|$selfillumfresnel]] Exists now.<br>
* {{ent|$lightwarptexture}} Exists now.<br>
* {{Ent|$lightwarptexture}} Exists now.<br>
::{{todo|Make a parameter that allows its usage. Right now default behavior is replicated and a default bumpmap is bound.}}
::{{Todo|Make a parameter that allows its usage. Right now default behavior is replicated and a default bumpmap is bound.}}


==== '''With''' $Bumpmap ====
==== '''With''' $Bumpmap ====
* [[$detail#Parameters and Effects|$detailblendmode]] 5-9 work.<br>
* [[$detail#Parameters and Effects|$detailblendmode]] 5-9 work.<br>
* [[$detail#Parameters and Effects|$detailblendmode]] 10-11 planned. If possible.<br>
* [[$detail#Parameters and Effects|$detailblendmode]] 10-11 planned. If possible.<br>
* {{ent|$envmapmask}} Exists now.<br>
* {{Ent|$envmapmask}} Exists now.<br>
* [[Glowing_Textures#.24selfillum|$selfillummask]] Exists now.<br>
* [[Glowing_Textures#.24selfillum|$selfillummask]] Exists now.<br>
* {{ent|$selfillum_envmapmask_alpha}} Exists now.<br>
* {{Ent|$selfillum_envmapmask_alpha}} Exists now.<br>
* [[Glowing_Textures#.24selfillum|$selfillumfresnel]] + {{ent|$normalmapalphaenvmapmask}} Works now.<br>
* [[Glowing_Textures#.24selfillum|$selfillumfresnel]] + {{Ent|$normalmapalphaenvmapmask}} Works now.<br>


==== With $Phong ====
==== With $Phong ====
* [[$detail#Parameters and Effects|$detailblendmode]] 8-9 work now.<br>
* [[$detail#Parameters and Effects|$detailblendmode]] 8-9 work now.<br>
* [[$detail#Parameters and Effects|$detailblendmode]] 10-11 planned. If possible.<br>
* [[$detail#Parameters and Effects|$detailblendmode]] 10-11 planned. If possible.<br>
* {{note:zh-cn|[[$phong#Masking|$invertphongmask]] Now only flips the mask used for phong. It will no longer touch the envmapmask ''at all''.}}
* {{Note|[[$phong#Masking|$invertphongmask]] Now only flips the mask used for phong. It will no longer touch the envmapmask ''at all''.}}
* {{note:zh-cn|[[$phong#Colors|$phongalbedotint]] can now be used without [[$phong#Masking|$phongexponenttexture]].}}
* {{Note|[[$phong#Colors|$phongalbedotint]] can now be used without [[$phong#Masking|$phongexponenttexture]].}}
::{{notice:zh-cn|Will use entirety of {{ent|$basetexture}}, without being masked.}}
::{{Notice|Will use entirety of {{Ent|$basetexture}}, without being masked.}}
* [[$phong#Colors|$phongwarptexture]] works. ( does not work in {{l4d2}} ).<br>
* [[$phong#Colors|$phongwarptexture]] works. ( does not work in {{l4d2}} ).<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}}.<br>
* {{note:zh-cn|[[$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> }}
::{{notice:zh-cn|When no [[$phong#Masking|$phongexponenttexture]] is specified, Mask will be 1.0f!}}
::{{Notice|When no [[$phong#Masking|$phongexponenttexture]] is specified, Mask will be 1.0f!}}
* {{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>)
* {{important:zh-cn|By default the original masking for the $envmap will be replicated as to not have disparity.<br>
* {{Important|By default the original masking for the $envmap will be replicated as to not have disparity.<br>
However it can now be overriden using two new parameters. <code>$phongforcebasealphaenvmapmask</code> and <code>$phongforcenormalmapalphaenvmapmask</code>}}
However it can now be overriden 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}}.
::{{notice:zh-cn|This will make materials that previously used this intentionally, look different.}}
::{{Notice|This will make materials that previously used this intentionally, look different.}}
* [[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}}}}
Line 222: Line 221:
<br>
<br>


{{todo|Add LUX_WorldVertexTransition and other LUX_ Shaders to this list of comparison and changes.}}
{{Todo|Add LUX_WorldVertexTransition and other LUX_ Shaders to this list of comparison and changes.}}
:{{note:zh-cn| Probably better as their own pages to document all parameters.}}
: {{Note| Probably better as their own pages to document all parameters.}}

Latest revision as of 07:49, 12 July 2024

English (en)中文 (zh)Translate (Translate)
Zh/LUX
Development.pngAlpha 开发阶段中
Wiki
类型模组
开发商ShiroDkxtro2
引擎起源 起源
平台(存在于 个人电脑 个人电脑 之中)
基于起源2013 起源2013
 
GitHub
Join Discord server

LUX LUX是一个专门为起源2013 单人分支 起源2013 单人分支起源2013 多人分支 起源2013 多人分支制作和开发的模组,其目的皆在为完全重写所有原版和Mapbase Mapbase的着色器

目标

  • 大修\清理materialsystem\stdshaders\目录
Warning.png警告:除了现有的着色器编译功能外,几乎所有的东西都被“扬了”。
Note.png注意:实现LUX LUX的着色器需要将stdshaders/替换为LUX LUX自己的,这“有效”的扬了所有原版着色器的修改版,LUX应该能够实现所有起源2013Mapbase着色器原有的功能
Note.png注意:SDK着色器会自动回退到对应的LUX LUX版本,这样使用Mapbase Mapbase的模组无需太多改动就可以使用LUX
  • 大幅减少所有着色器的编译时间
Why?: 起源2013 单人分支起源2013 多人分支异形丛生,V社的着色器需要非常长的时间进行编译。尤其是在使用原版编译器的情况下。这限制了着色器的修改
Note.png注意:即便使用高端CPU也至少需要半天或更久的时间进行编译。以LUX LUX为例,在4核@4.1Hz环境下编译整个LUX_Lightmappedgeneric仅需要大约30秒
  • 着色器仅使用SM 3.0
Why?: ps20b及以下有太多限制。缺少可用的常量寄存器会导致极端分支和大量“组合”。使代码变成一坨难以阅读和理解的屎山。这会抑制模组制作者的积极性。
Note.png注意:SM3.0于2004年发布,V社在2008年考虑到了ps2.0及以下的低端硬件。详见幻灯片第8页
Note.png注意:这意味着不支持SM3.0的低端硬件将无法使用新的着色器
Note.png注意:Linux和MacOS暂无官方支持。以上系统用户需要使用togl进行补丁才能使用SM3.0,或使用DXVK
  • 完全重写.h, .cpp, .fxc文件
  • 更多有关着色器、自身参数、如何工作以及任何可能的注意事项的文档
Note.png注意:你可能已经注意到了如$lightwarptexture$detailUnlitTwoTexture$envmapmask得到了由ShiroDkxtro2贡献的重大更新
他为军团要塞2异形丛生起源2013反恐精英:全球攻势添加了新的注意事项和bug记录。这些文档是LUX LUX开发的直接结果,尽管开发的重点集中在起源2013异形丛生上,因为他们是开源项目
Note.png注意:目前缺少有关着色器如何在起源中工作的文档,这导致起源的图形学领域门槛很高,需要有大量的相关经验,阻碍了模组制作者们修改着色器和创作自己的
  • 实现起源2013没有的内容
参见:  计划实现的功能. 这个目标包含了例如$selfillumtexture的旧功能和例如$phongalbedoboost(存在于 csgo 之中)的新功能

  • 修复大多数参数的Bug和警告
参见:  原版着色器与LUX着色器对比

  • 禁用特定功能的简单方法
Note.png注意:已制作一个自定义的预处理程序,可以通过禁用不需要的功能来使着色器编译的更快
  • 对Mapbase的兼容性
Note.png注意:要替换其他mod(如Source 2013社区版,以Mapbase为本体的mod)修改的原版着色器,应该和直接替换stdshaders\目录一样简单
Note.png注意: 以上假定除修改的原版着色器外无其他的自定义着色器,但如果确实有,开发者应该能将它们添加回来,因为这是添加自定义着色器的先决条件

计划实现的功能

这是正在实施的新功能列表,或者将从较新的引擎分支移植/复刻的功能,例如异形丛生求生之路2反恐精英:全球攻势

Note.png注意:该语境下的被移植“对象”通常指异形丛生 异形丛生Mapbase Mapbase,但在多数情况下,其代码会出于简化或大修的目的而进行大量修改
Icon-Important.png重要:LUX LUX不使用任何的泄露代码。像$phongalbedoboost(存在于 csgo 之中)这样的功能不是什么难以实现的东西,它们可以在不使用泄露代码的情况下安全的复现
Warning.png警告:对于更复杂的功能,与V社的实现方法相比可能存在视觉差异。

出于Mapbase Mapbase兼容性而需实现的功能

Note.png注意:就像Mapbase Mapbase一样,视差反射需要自定义的地图编译器
Icon-Important.png重要:LUXMapbase参数是一样的,所以Mapbase的地图编译器也可以使用
待完善: 这真的是移植自异形丛生Mapbase功能吗

New Features

  • In 起源2013 多人分支 Models utilizing Model Lightmapping can use $bumpmap. Additionally all Model shaders will be able to utilize this feature. Except they have $phong.
Icon-Important.png重要:The Lightmap does not do bumped-lighting using the bumpmap. Only named-lights/projected textures will be able to do so.
Note.png注意: Lightmapped models will not be able to receive $phong. This is not planned at the moment but should be possible for named-lights/projected textures!
  • In 起源2013 多人分支 Models can utilize Lightmap UV's.
Warning.png警告:The way this is currently implemented requires a custom written tool, two smd's ( one with lightmap uv ) and also has a lot of precision loss for the Lightmap UV's. Additionally this requires a custom compiler!
待完善: Investigate 起源2007 code, supposedly the Studiomdl code is there. Maybe it can be packed via Blendweights or alternatively the precision loss might be decreased.

Features ported/recreated/revived

Note.png注意:LUX allows the use of Rec. 709 HDTV Luminance Weights. 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)

Note.png注意: Yes, there is a use for this! $detailblendmode 5 is commonly used for glowing textures. This parameter allows for not wasting your $detail. Additionally no $emissiveblend is required.
参见:  PBR Shaders in the community commonly have a $emissiontexture parameter that does EXACTLY what $selfillumtexture does in LUX.

Icon-Important.png重要:
  • On brushes this will use the Lightmap
  • On models with $bumpmap, this will use bumped lighting.
  • On models without $bumpmap, this will use Vertex Lighting.
  • In 起源2013 多人分支 Models utilizing Model Lightmapping, will use the Lightmap. Regardless of whether or not $bumpmap is used.

Features that are being discarded

  • $envmapsphere and related - These features have been removed since 异形丛生 and are obsolete.
Note.png注意:This is very easy to re-implement. The 7th face of a Cubemap is still being built in 起源2013 and therefore this feature is still operational given that the code has been implemented!

Features that won't be ported/recreated/revived

  • $basealphaenvmapmaskminmaxexp from 异形丛生 - This parameter is not yet documented on the VDC, it is also unclear what exactly it does...
  • $EnvMapLightScaleMinMax from 反恐精英:全球攻势

Not functional - FOR NOW



Stock Shaders VS LUX

待完善: Move This to their own pages or something like that.

LightMappedGeneric

Stock Shader's

Icon-Bug.png错误:$detailblendmode起源2013军团要塞2 2-9 Don't work.  [todo tested in ?]
Icon-Bug.png错误:$detailblendmode异形丛生 6 Doesn't work.  [todo tested in ?]
Icon-Bug.png错误:$detailblendmode反恐精英:全球攻势 1-6, 8 Don't work. 9 Does not work with $bumpmap, $envmap or $selfillum  [todo tested in ?]


Icon-Bug.png错误:$bumpmap + $envmapmask Doesn't work, except in 反恐精英:全球攻势 反恐精英:全球攻势  [todo tested in ?]
Icon-Bug.png错误:$lightwarptexture + $detail军团要塞2异形丛生 Doesn't work  [todo tested in ?]
Icon-Bug.png错误:$basealphaenvmapmask + bumpmap Doesn't work  [todo tested in ?]


Note.png注意:$selfillummask Missing
Note.png注意:$selfillum_envmapmask_alpha Missing
Note.png注意:$selfillumfresnel Missing
Note.png注意:$blendtintbybasealpha Missing
Note.png注意:$detailtexturetransform Missing
Note.png注意:$lightwarptexture反恐精英:全球攻势 Missing
Note.png注意:$envmapfresnelminmaxexp(存在于 求生之路+ 之中)
Note.png注意:$envmaplightscale(存在于 异形丛生+ 之中)
Note.png注意:$basealphaenvmapmask requires inverted masks

LUX_LightMappedGeneric

Note.png注意:Caveat - Has higher priority than $selfillum/$selfillummask.
Note.png注意:Caveat - $selfillumtexture has higher priority than both.
Icon-Important.png重要:$basealphaenvmapmask does no longer require a flipped mask.
PlacementTip.png解决方案:Materials that previously used have to be adjusted. Use $envmapmask or $normalmapalphaenvmapmask instead!

VertexLitGeneric

Stock Shader's

Always

$envmaplightscale(存在于 反恐精英:全球攻势 之中).

Without $Bumpmap

Icon-Bug.png错误:$detailblendmode起源2013军团要塞2异形丛生反恐精英:全球攻势 10-11 Don't work.  [todo tested in ?]
Icon-Bug.png错误:$selfillumfresnel missing.  [todo tested in ?]
Icon-Bug.png错误:$lightwarptexture missing.  [todo tested in ?]
Note.png注意:$lightwarptexture fores bumpmapping by binding a default one, unless one is manually specified.

With $Bumpmap

Icon-Bug.png错误:$detailblendmode起源2013军团要塞2异形丛生反恐精英:全球攻势 5-11 Don't work.  [todo tested in ?]
Icon-Bug.png错误:$detailblendmode反恐精英:全球攻势 5-6 & 8-11 Don't work.  [todo tested in ?]
Note.png注意:$envmapmask missing. Except Mapbase.
Note.png注意:$selfillummask missing.
证实:Only in Mapbase?
Note.png注意:$selfillum_envmapmask_alphaMapbase missing.
Icon-Bug.png错误:$selfillumfresnel disables $normalmapalphaenvmapmask.
待完善: Also on other branches than 异形丛生?
  [todo tested in ?]

With $Phong

Icon-Bug.png错误:$detailblendmode起源2013军团要塞2异形丛生反恐精英:全球攻势 8-11 Don't work.  [todo tested in ?]
Icon-Bug.png错误:$invertphongmask异形丛生起源2013 In the shadercode, only flips the mask used for $envmap.
证实:Also on newer branches?
  [todo tested in ?]
Icon-Bug.png错误:$phongalbedotint cannot be used without $phongexponenttexture.  [todo tested in ?]
Icon-Bug.png错误:$phongwarptexture求生之路2 does not work.  [todo tested in ?]
Icon-Bug.png错误:$phongalbedoboost(存在于 反恐精英:全球攻势 之中) + $detail does not work.  [todo tested in ?]
Icon-Bug.png错误:$phongtint disables $phongalbedotint.  [todo tested in ?]
Icon-Bug.png错误:$envmap always masked by something.  [todo tested in ?]
Icon-Bug.png错误:Only in 求生之路+ $envmap masked by $basetexture luminance when $normalmapalphaenvmapmask and $basemapluminancephongmask is used.  [todo tested in ?]
Icon-Bug.png错误:$envmap masked by $basetexture alpha when $normalmapalphaenvmapmask and $basemapalphaphongmask is used.  [todo tested in ?]
Icon-Bug.png错误:$basemapalphaphongmask makes $phong ignore the $bumpmap.  [todo tested in ?]
Icon-Bug.png错误:$selfillumfresnel + $normalmapalphaenvmapmask will cause the $envmap to be multiplied by 0.0f regardless of whether $invertphongmask is used.  [todo tested in ?]
Icon-Bug.png错误:$selfillumfresnel will cause $envmap to be masked using the $basetexture alpha channel  [todo tested in ?]
Note.png注意:$phongdisablehalflambert only in 异形丛生+
Note.png注意:$phongexponentfactor only in 军团要塞2起源2013 多人分支
Note.png注意:$basemapluminancephongmask only in 求生之路+
Note.png注意:$phongalbedoboost only in 反恐精英:全球攻势+

LUX_VertexLitGeneric

Without $Bumpmap

待完善: Make a parameter that allows its usage. Right now default behavior is replicated and a default bumpmap is bound.

With $Bumpmap

With $Phong

Note.png注意:Will use entirety of $basetexture, without being masked.
Note.png注意:When no $phongexponenttexture is specified, Mask will be 1.0f!
  • $envmap Can now be not-masked by using a new parameter ($phongenvmapnomask)
  • Icon-Important.png重要:By default the original masking for the $envmap will be replicated as to not have disparity.

However it can now be overriden using two new parameters. $phongforcebasealphaenvmapmask and $phongforcenormalmapalphaenvmapmask

Note.png注意:This will make materials that previously used this intentionally, look different.





待完善: Add LUX_WorldVertexTransition and other LUX_ Shaders to this list of comparison and changes.
Note.png注意: Probably better as their own pages to document all parameters.