Zh/$detail: Difference between revisions
(chatgpt translation) |
(deepseek translation) Tag: Reverted |
||
Line 1: | Line 1: | ||
{{LanguageBar}} | {{LanguageBar}} | ||
{{translate}} | |||
{{Source topicon}} | {{Source topicon}} | ||
{{toc-right}} | {{toc-right}} | ||
{{tabsBar|main= | {{tabsBar|main=detail textures}} | ||
[[File:Detail.jpg|frame|right| | [[File:Detail.jpg|frame|right|应用细节贴图(noise_detail_01)及其在材质(brickwall031a)上的效果。]] | ||
{{this is a|shader parameter|name=$detail}} | {{this is a|shader parameter|name=$detail}} 指定一个[[texture]],当近距离观察时,Source引擎会根据<tt>$detailblendmode</tt>通过适当调整[[albedo]]的明暗来为材质添加高分辨率细节。您也可以使用全彩色图像(而非灰度图)并通过{{Code|$detailblendmode 2}}进行混合。该参数能显著提升纹理的视觉分辨率,在{{hl2ep2|4}}和{{portal2|4}}的白瓷砖表面凹凸效果中被广泛使用。 | ||
{{Bug| {{Code|$detail}} | {{Bug| {{Code|$detail}} 贴图与以下参数存在兼容性问题: | ||
* 在{{as}}{{csgo}}{{src13}}{{tf2}} | * 在{{as}}{{csgo}}{{src13}}{{tf2}}的{{ent|LightmappedGeneric}}中,无法与{{ent|$seamless_scale}}共同使用。 | ||
* 在{{as}}{{csgo}}{{src13}}{{tf2}} | * 在{{as}}{{csgo}}{{src13}}{{tf2}}的{{ent|VertexLitGeneric}}中,若使用{{ent|$bumpmap}}则无法与{{ent|$selfillumfresnel}}共同使用。 | ||
* 在{{as}}{{src13}}{{tf2}} | * 在{{as}}{{src13}}{{tf2}}的{{ent|LightmappedGeneric}}中,无法与{{ent|$lightwarptexture}}共同使用。 | ||
}} | }} | ||
: {{Note|<span><!-- | : {{Note|<span><!-- 修复列表显示 --></span> | ||
:* 在{{csgo}}中,{{ent|LightmappedGeneric}} | :* 在{{csgo}}中,{{ent|LightmappedGeneric}}似乎并未将{{ent|$lightwarptexture}}作为参数... 因此不存在"无法使用"的情况。 | ||
:* 在{{as}}{{csgo}} | :* 在{{as}}{{csgo}}的{{ent|VertexLitGeneric}}中,无法与{{ent|$desaturatewithbasealpha}}共同使用。 | ||
:* 在{{as}} | :* 在{{as}}中,无法同时使用{{ent|$blendmodulatetexture}} '''和''' {{ent|$bumpmap}} | ||
}} | }} | ||
: {{Todo| | : {{Todo| 记录其他Source分支中的兼容性问题。}} | ||
: {{ModernConfirm|在{{as}} | : {{ModernConfirm| 在{{as}}中无法使用的功能,通常也无法在{{l4d}}中使用,反之亦然。建议进行实际验证。}} | ||
: {{bug| | : {{bug| 在{{as}}中同时使用{{Code|$detail}}和{{ent|$blendmodulatetexture}}会导致图形问题(表面条纹),仅在{{csgo}}和{{GMOD}}中正常。}} | ||
== 语法 == | == 语法 == | ||
Line 28: | Line 29: | ||
$detail <texture> | $detail <texture> | ||
通常需同时使用至少<code>$detailscale</code>参数(见下文)。 | |||
== | == 参数与效果 == | ||
{{MatParam | {{MatParam | ||
| $detailtexturetransform|matrix|dx9 = 1 | | $detailtexturetransform|matrix|dx9 = 1 | ||
| | | 对细节贴图进行旋转、缩放等变换。{{VMT UVtransform}} | ||
{{Bug| | {{Bug|该参数不适用于{{ent|LightmappedGeneric}}、{{ent|WorldVertexTransition}}、{{ent|LightmappedTwoTexture}}、{{ent|WorldTwoTextureBlend}}以及{{only|{{csgo}}}}的{{ent|Lightmapped_4WayBlend}}。}} | ||
{{Bug| | {{Bug|无法与{{ent|$treesway}}共同使用。}} | ||
}} | }} | ||
{{MatParam | {{MatParam | ||
|$detailscale| float | |$detailscale| float | ||
| | | 设置细节贴图在材质上的重复次数(默认值{{=}}4)。通常替代<code>$detailtexturetransform</code>使用,对于128px细节贴图推荐值约为7或8。如需独立缩放X/Y轴,请使用括号格式:<code>$detailscale "[4 8]"</code> | ||
}} | }} | ||
{{MatParam | {{MatParam | ||
|$detailblendfactor|normal| | |$detailblendfactor|normal| | ||
控制细节贴图对基础贴图的影响程度。具体效果取决于混合模式,多数情况下类似[[$alpha]]。值0通常使细节贴图无效,值1应用完整效果。 | |||
{{bug| | {{bug|在[[UnlitGeneric]]上对<code>$detailblendmode</code>1或5无效(测试于{{dods}})。}} | ||
}} | }} | ||
{{MatParam | {{MatParam | ||
|$detailblendmode| int | |$detailblendmode| int | ||
| | | 细节材质与漫反射/albedo的混合方式。 | ||
: | : 共有12种混合模式,但并非所有着色器都支持全部模式(见下文)。 | ||
: | : 混合模式实现于{{Path|stdshaders/common_ps_fxc|h}}。 | ||
[[File:Detail_blend_modes_l4d2.jpg||320px|thumb|right|L4D2中的混合模式,混合因子0.8(从左到右模式0-11,上排100%不透明度,下排50%)。]] | |||
{{Table | {{Table | ||
Line 65: | Line 65: | ||
| {{td| 0 |dark=1}} | | {{td| 0 |dark=1}} | ||
{{td| DecalModulate }} | {{td| DecalModulate }} | ||
{{td| | {{td| 功能同{{ent|DecalModulate}}着色器——低于128的色值使图像变暗,高于则变亮。 | ||
{{tip|使用{{vtex|2}}的{{mono|mipblend}} | {{tip|使用{{vtex|2}}的{{mono|mipblend}}选项可使该模式的细节贴图在远距离时"淡出",减少锯齿。}} }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 1 |dark=1}} | | {{td| 1 |dark=1}} | ||
{{td| | {{td| 叠加 }} | ||
{{td| | {{td| 将细节贴图颜色叠加到基础贴图(类似{{ent|$additive}},但受光照影响,参见模式5)。 }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 2 |dark=1}} | | {{td| 2 |dark=1}} | ||
{{td| 半透明细节 }} | {{td| 半透明细节 }} | ||
{{td| | {{td| 以半透明覆盖方式应用细节贴图。 }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 3 |dark=1}} | | {{td| 3 |dark=1}} | ||
{{td| | {{td| 混合因子淡出 }} | ||
{{td| | {{td| 以半透明覆盖应用细节贴图,忽略其alpha通道,改用混合因子控制基础贴图显示量。 }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 4(?) |dark=1}} | | {{td| 4(?) |dark=1}} | ||
{{td| | {{td| 半透明基底 }} | ||
{{td| | {{td| 反转常规层级关系:细节贴图位于"下层",通过基础alpha通道作为半透明覆盖控制。细节alpha通道控制整体材质alpha(用于透明度/遮罩等)。{{note|与依赖{{cmd|$basetexture}}的[[VRAD]]纹理阴影不兼容。}} }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 5 |dark=1}} | | {{td| 5 |dark=1}} | ||
{{td| | {{td| 无光叠加 }} | ||
{{td| | {{td| 类似模式1的叠加效果,但颜色不受光照影响(发光效果)。 }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 6 |dark=1}} | | {{td| 6 |dark=1}} | ||
{{td| | {{td| 无光叠加阈值淡出 }} | ||
{{td| | {{td| 类似模式5的无光叠加,但根据混合因子是否高于0.5分两种模式添加颜色。{{clarify|具体如何调整?}} }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 7 |dark=1}} | | {{td| 7 |dark=1}} | ||
{{td| | {{td| 双图案DecalModulate }} | ||
{{td| | {{td| 仅使用细节贴图的红色和alpha通道。功能类似模式0,但基础alpha通道控制使用红色(0)或alpha(255)通道作为调制源,可实现两种灰度细节材质。 | ||
{{tip| | {{tip|若需非压缩格式存储,建议使用[[VTF_(Valve_Texture_Format)#Image_data_formats|IA88格式]]替代BGRA8888,文件体积减半且无质量损失。}} }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 8 |dark=1}} | | {{td| 8 |dark=1}} | ||
{{td| | {{td| 相乘 }} | ||
{{td| | {{td| 基础贴图颜色与细节贴图颜色相乘。 }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 9 |dark=1}} | | {{td| 9 |dark=1}} | ||
{{td| | {{td| 基于细节Alpha的基底遮罩 }} | ||
{{td| | {{td| 仅使用细节alpha通道,与基础alpha相乘生成最终alpha值。{{tip|推荐使用[[VTF_(Valve_Texture_Format)#Image_data_formats|A8格式]]替代DXT5以提高质量。}} }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 10 |dark=1}} | | {{td| 10 |dark=1}} | ||
{{td| 自阴影凹凸贴图 }} | {{td| 自阴影凹凸贴图 }} | ||
{{td| | {{td| 将细节贴图作为(额外){{ent|$ssbump}}凹凸贴图,忽略混合因子。 | ||
{{Note| | {{Note|可叠加标准凹凸贴图与自阴影凹凸贴图,但性能消耗较高,慎用。}} | ||
{{ModernImportant| | {{ModernImportant|必须存在$bumpmap!若细节贴图VTF标记SSBump标志且存在$bumpmap时自动启用!}} }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| 11 |dark=1}} | | {{td| 11 |dark=1}} | ||
{{td| SSBump反照率 }} | {{td| SSBump反照率 }} | ||
{{td| | {{td| 通过计算SSBump的高于平均值的'亮度',将其作为环境遮蔽贴图使用。 | ||
公式:<code>基底贴图 * (细节贴图.r*(2/3)+细节贴图.g*(2/3)+细节贴图.b*(2/3))</code> | |||
{{ModernImportant| | {{ModernImportant|不可与$bumpmap共用!若细节贴图VTF标记SSBump标志则自动启用!}} }} | ||
}} | }} | ||
}} | }} | ||
{{ModernImportant| | {{ModernImportant|下方列出各游戏/着色器对各模式的限制。使用不支持的混合模式会导致控制台报"Missing Shader Combo"错误,材质将无法渲染! | ||
{{Table | {{Table | ||
| {{tr | | {{tr | ||
Line 137: | Line 137: | ||
| {{td| {{csgo}} |dark=1}} | | {{td| {{csgo}} |dark=1}} | ||
{{td| {{ent|LightmappedGeneric}} }} | {{td| {{ent|LightmappedGeneric}} }} | ||
{{td| | {{td| 不支持模式1-6和8<br> | ||
模式9无法与{{ent|$bumpmap}}、{{ent|$envmap}}、{{ent|$selfillum}} | 模式9无法与{{ent|$bumpmap}}、{{ent|$envmap}}、{{ent|$selfillum}}共用。}} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| {{csgo}} |dark=1}} | | {{td| {{csgo}} |dark=1}} | ||
{{td| {{ent|WorldVertexTransition}} }} | {{td| {{ent|WorldVertexTransition}} }} | ||
{{td| | {{td| 不支持模式1-6、8-9<br> | ||
模式7无法与{{ent|$blendmodulatetexture}} | 模式7无法与{{ent|$blendmodulatetexture}}共用。}} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| {{csgo}} |dark=1}} | | {{td| {{csgo}} |dark=1}} | ||
{{td| {{ent|VertexLitGeneric}} }} | {{td| {{ent|VertexLitGeneric}} }} | ||
{{td| | {{td| 不支持模式10+11<br>0-4和7始终有效(有无{{ent|$bumpmap}}均可)<br>5+6仅支持{{ent|$phong}}或无{{ent|$bumpmap}}<br>8+9仅支持无{{ent|$bumpmap}} }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| {{csgo}} |dark=1}} | | {{td| {{csgo}} |dark=1}} | ||
{{td| {{ent|Lightmapped_4WayBlend}} }} | {{td| {{ent|Lightmapped_4WayBlend}} }} | ||
{{td| | {{td| 不支持模式1-6 }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| {{src13}} {{ | | {{td| {{src13}}<br>{{tf2branch}} |dark=1}} | ||
{{td| {{ent|LightmappedGeneric}}<br>{{ent|WorldVertexTransition}} }} | {{td| {{ent|LightmappedGeneric}}<br>{{ent|WorldVertexTransition}} }} | ||
{{td| | {{td| 不支持模式2-9<br>0+1始终有效<br>模式10无法与{{ent|$ssbump}}共用<br> | ||
替代方案:<br> 模式2改用{{ent|WorldTwoTextureBlend}}<br> 模式8改用{{ent|LightmappedTwoTexture}} }} | |||
}} | }} | ||
{{tr | {{tr | ||
| {{td| {{src13}} {{ | | {{td| {{src13}}<br>{{tf2branch}}<br>{{as}} |dark=1}} | ||
{{td| {{ent|VertexLitGeneric}} }} | {{td| {{ent|VertexLitGeneric}} }} | ||
{{td| | {{td| 不支持模式10+11<br>0-4始终有效(有无{{ent|$bumpmap}}均可)<br>5+6仅支持{{ent|$phong}}或无{{ent|$bumpmap}}<br>7-9仅支持无{{ent|$bumpmap}} }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| {{as}} |dark=1}} | | {{td| {{as}} |dark=1}} | ||
{{td| {{ent|LightmappedGeneric}}<br>{{ent|WorldVertexTransition}} }} | {{td| {{ent|LightmappedGeneric}}<br>{{ent|WorldVertexTransition}} }} | ||
{{td| | {{td| 不支持模式6<br> | ||
模式7无法与{{ent|$bumpmap2}}、{{ent|$softedges}} | 模式7无法与{{ent|$bumpmap2}}、{{ent|$softedges}}、{{ent|$blendmodulatetexture}}共用。 }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td| {{l4d2}} |dark=1}} | | {{td| {{l4d2}} |dark=1}} | ||
{{td| 所有着色器 }} | {{td| 所有着色器 }} | ||
{{td| | {{td| 不支持模式1、4、6、9、10 }} | ||
}} | }} | ||
}} | |||
{{note|混合模式5和6在光照后应用,模式10在光照时应用,其余均在光照前应用。}} | |||
}} | }} | ||
}} | }} | ||
{{MatParam|$detailtint|RGB matrix|细节贴图的色彩调色。 | |||
{{MatParam|$detailtint|RGB | |||
{{Bug | {{Bug | ||
| 在 {{src13}} {{tf2}} {{as}} {{csgo}} | | 在{{src13}} {{tf2}} {{as}} {{csgo}}的{{ent|VertexLitGeneric}}中,无法与{{ent|$bumpmap}}或{{ent|$phong}}共用}} | ||
{{Bug|无法与 {{ent|$blendtintbybasealpha}} | {{Bug|无法与{{ent|$blendtintbybasealpha}}共用<br> | ||
{{Todo| | {{Todo|验证受影响游戏(已知{{l4d2}} {{tf2}} {{portal2}} {{csgo}} {{as}} {{src13}}中有效)。}} | ||
}} | }} | ||
}} | }} | ||
{{MatParam|$detailframe| | {{MatParam|$detailframe|int|dx9=1|动画细节贴图的起始帧。}} | ||
{{MatParam|$detail_alpha_mask_base_texture|bool|removed={{csgo}}|仅{{ent|WorldVertexTransition}}。启用时细节alpha决定"基础贴图混合"。{{ModernImportant|自{{src13}}起此参数实际无效!}}}} | |||
{{MatParam|$detail_alpha_mask_base_texture| | |||
<br> | <br> | ||
=== {{csgo}} <tt>WorldVertexTransition</tt> 参数 === | === {{csgo}} <tt>WorldVertexTransition</tt> 参数 === | ||
{{Confirm| | {{Confirm|这些参数是否仅限于{{csgo}},还是适用于所有{{csgobranch}}分支游戏?}} | ||
{{MatParam|$detail2| | {{MatParam|$detail2|texture|only={{csgo}}|shaders=WorldVertexTransition| | ||
{{ent|WorldVertexTransition}}第二层的细节贴图。 | |||
{{Note|{{ent|LightmappedGeneric}} | {{Note|{{ent|LightmappedGeneric}}理论上支持此参数及其他<code>WorldVertexTransition</code>参数,但可能异常。}} | ||
{{Note| | {{Note|无<code>$detailtransform2</code>参数,着色器将使用{{ent|$basetexturetransform2}}替代!}} | ||
{{ModernImportant| | {{ModernImportant|需同时存在<code>$detail</code>和<code>$basetexture2</code>!}} | ||
{{Bug|无法与 <code>$detailblendmode "9"</code> | {{Bug|无法与<code>$detailblendmode "9"</code>共用。}} | ||
}} | }} | ||
{{MatParam|$detailscale2| | {{MatParam|$detailscale2|float|<tt>$detail2</tt>的缩放比例。|only={{csgo}}|shaders=WorldVertexTransition}} | ||
{{MatParam|$detailblendfactor2| | {{MatParam|$detailblendfactor2|normal|<tt>$detail2</tt>的混合因子。{{Note|<code>$detailblendfactor</code>与<code>$detailblendfactor2</code>会先混合再与基础贴图结合。}}|only={{csgo}}|shaders=WorldVertexTransition}} | ||
{{MatParam|$detailframe2| | {{MatParam|$detailframe2|int|动画<code>$detail2</code>的起始帧。|only={{csgo}}|shaders=WorldVertexTransition}} | ||
{{MatParam|$detailtint2|RGB | {{MatParam|$detailtint2|RGB matrix|<tt>$detail2</tt>的调色。|only={{csgo}}|shaders=WorldVertexTransition}} | ||
<br> | <br> | ||
=== {{csgo}}{{portal2}} <tt>SolidEnergy</tt> 参数 === | === {{csgo}}{{portal2}} <tt>SolidEnergy</tt> 参数 === | ||
{{Todo| | {{Todo|验证{{portal2}}中的信息准确性}} | ||
{{ | {{ModernConfirm|{{ent|SolidEnergy}}是否存在于{{csgobranch}}分支游戏中?}} | ||
{{ | {{Note|$detail1tint和$detail2tint在此着色器中不存在,列表中已作刻意省略!}} | ||
{{ | {{ModernImportant|<code>$detail</code>参数名称相似但功能不同!}} | ||
{{MatParam|$detail1blendmode| | {{MatParam|$detail1|texture|only={{csgo}}{{portal2}}|shaders=SolidEnergy|{{ent|SolidEnergy}}的第二层细节贴图。}} | ||
{{MatParam|$detail1blendmode|int|only={{csgo}}{{portal2}}|shaders=SolidEnergy| | |||
细节材质与反照率的混合方式。 | |||
:共2种混合模式: | |||
{{Table | {{Table | ||
| {{tr | | {{tr | ||
Line 231: | Line 229: | ||
| {{td|0|align=center|dark=1}} | | {{td|0|align=center|dark=1}} | ||
{{td|DecalModulate}} | {{td|DecalModulate}} | ||
{{td| | {{td|功能同{{ent|DecalModulate}}着色器——色值低于128变暗,高于则变亮。}} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|1|align=center|dark=1}} | | {{td|1|align=center|dark=1}} | ||
{{td| | {{td|相乘}} | ||
{{td| | {{td|$basetexture与$detail1相乘,$basetexture的alpha控制效果强度(黑色全效,白色无效)。}} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
{{MatParam|$detail1scale|float|<tt>$detail2</tt>的缩放比例。{{Note| 实际无效。}}|only={{csgo}}{{portal2}}|shaders=SolidEnergy}} | |||
{{MatParam|$detail1scale| | {{MatParam|$detail1blendfactor|float|<tt>$detail2</tt>的混合因子。{{Note| 实际无效。}}|only={{csgo}}{{portal2}}|shaders=SolidEnergy}} | ||
{{MatParam|$detail1frame|int|only={{csgo}}{{portal2}}|shaders=SolidEnergy|动画<code>$detail1</code>的起始帧。 | |||
{{MatParam|$detail1blendfactor| | {{ModernImportant|{{csgo}}的{{ent|WorldVertexTransition}}有类似<code>$detail2</code>参数,但功能不同!}}}} | ||
{{MatParam|$detail2|texture|only={{csgo}}{{portal2}}|shaders=SolidEnergy|{{ent|SolidEnergy}}的第三层细节贴图。}} | |||
{{MatParam|$detail1frame| | {{MatParam|$detail2blendmode|int|only={{csgo}}{{portal2}}|shaders=SolidEnergy| | ||
{{ModernImportant|{{csgo}} 的 {{ent|WorldVertexTransition}} | 细节材质与反照率的混合方式。 | ||
:共2种混合模式: | |||
{{MatParam|$detail2| | |||
{{MatParam|$detail2blendmode| | |||
{{Table | {{Table | ||
| {{tr | | {{tr | ||
Line 259: | Line 252: | ||
{{tr | {{tr | ||
| {{td|0|align=center|dark=1}} | | {{td|0|align=center|dark=1}} | ||
{{td| | {{td|叠加}} | ||
{{td|将 | {{td|将$detail2叠加到$basetexture。{{Note|若使用$detail1,$detail2会先与$detail2相乘!}}}} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|1|align=center|dark=1}} | | {{td|1|align=center|dark=1}} | ||
{{td| | {{td|相乘}} | ||
{{td| | {{td|$basetexture与$detail2相乘。{{Note|无法控制效果强度。}}}} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
{{MatParam|$detail2scale|float|<tt>$detail2</tt>的缩放比例。{{Note| 实际无效。}}|only={{csgo}}{{portal2}}|shaders=SolidEnergy}} | |||
{{MatParam|$detail2blendfactor|float|<tt>$detail2</tt>的混合因子。{{Note| 实际无效。}}|only={{csgo}}{{portal2}}|shaders=SolidEnergy}} | |||
{{MatParam|$detail2frame|int|动画<code>$detail2</code>的起始帧。|only={{csgo}}{{portal2}}|shaders=SolidEnergy}} | |||
== Valve预设细节贴图 == | |||
Valve官方细节贴图(仅OB可用)推荐使用以下预设参数: | |||
$detail detail\''' | $detail detail\'''noise_detail_01''' ''// 适用于砖墙、混凝土等...'' | ||
$detailscale | $detailscale 7.74 | ||
$detailblendfactor | $detailblendfactor 0.8 | ||
$detailblendmode 0 | $detailblendmode 0 | ||
$detail detail\''' | $detail detail\'''metal_detail_01''' | ||
$detailscale | $detailscale 4.283 | ||
$detailblendfactor | $detailblendfactor .65 | ||
$detailblendmode 0 | $detailblendmode 0 | ||
$detail detail\'''rock_detail_01''' | |||
$detailscale 11 | |||
$detailblendfactor 1 | |||
$detailblendmode 0 | |||
$detail detail\''' | $detail detail\'''plaster_detail_01''' | ||
$detailscale | $detailscale 6.783 | ||
$detailblendfactor | $detailblendfactor .8 | ||
$detailblendmode 0 | $detailblendmode 0 | ||
以下参数来自<tt>models\props_forest\LadderWood.vmt</tt>,是唯一使用<tt>detail\wood_detail_01</tt>(1024×1024高分辨率)的官方材质文件,因此<code>$detailscale</code>较低(除<tt>rock_detail_01</tt>外): | |||
$detail detail\'''wood_detail_01''' | |||
$detailscale 2.563 | |||
$detailblendfactor .8 | |||
$detailblendmode 0 | |||
另有{{Code|detail\detailash001a}}和{{Code|detail\detaildirt001a}}两个贴图曾用于"泄露版"{{hl2|2}}及{{hl2ep1|2}}的以下材质: | |||
{{Code| | {{hl2ep1|2}}材质{{Code|Concrete/concretefloor009a}}参数: | ||
$detail detail/'''detaildirt001a''' | |||
$detailscale 0.27 | |||
$detail detail/'''detailash001a''' | {{hl2ep1|2}}材质{{Code|Metal/metalfloor005a}}参数: | ||
$detailscale 0.50 | $detail detail/'''detailash001a''' | ||
$detailscale 0.50 | |||
== | == 另见 == | ||
[https://web.archive.org/web/20191215081655/https://blog.maxofs2d.net/post/83154062767/hiding-large-scale-tiling-with-detail-textures | [https://web.archive.org/web/20191215081655/https://blog.maxofs2d.net/post/83154062767/hiding-large-scale-tiling-with-detail-textures 使用细节贴图隐藏重复平铺] - 如何通过$detail减少贴图重复感 | ||
{{ACategory|Shader parameters|d}} |
Revision as of 21:46, 28 January 2025

This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.
$detail
是一个材质着色器 参数,可在所有的 起源 游戏中使用。 指定一个texture,当近距离观察时,Source引擎会根据$detailblendmode通过适当调整albedo的明暗来为材质添加高分辨率细节。您也可以使用全彩色图像(而非灰度图)并通过$detailblendmode 2进行混合。该参数能显著提升纹理的视觉分辨率,在
半衰期2:第二章和
传送门2的白瓷砖表面凹凸效果中被广泛使用。

- 在
的LightmappedGeneric中,无法与$seamless_scale共同使用。
- 在
的VertexLitGeneric中,若使用$bumpmap则无法与$selfillumfresnel共同使用。
- 在
的LightmappedGeneric中,无法与$lightwarptexture共同使用。
注意:
- 在
中,LightmappedGeneric似乎并未将$lightwarptexture作为参数... 因此不存在"无法使用"的情况。
- 在
的VertexLitGeneric中,无法与$desaturatewithbasealpha共同使用。
- 在
中,无法同时使用$blendmodulatetexture 和 $bumpmap
- 在
- 待完善: 记录其他Source分支中的兼容性问题。
错误: 在
中同时使用$detail和$blendmodulatetexture会导致图形问题(表面条纹),仅在
和
中正常。 [todo tested in ?]
语法
$detail <texture>
通常需同时使用至少$detailscale
参数(见下文)。
参数与效果
$detailframe
$detail_alpha_mask_base_texture
WorldVertexTransition 参数
$detailscale2
$detailblendfactor2
$detailframe2
$detailtint2

SolidEnergy 参数




$detail
参数名称相似但功能不同!$detail1
$detail1blendmode
$detail1scale
$detail1blendfactor
$detail1frame
$detail2
$detail2blendmode
$detail2scale
$detail2blendfactor
$detail2frame
Valve预设细节贴图
Valve官方细节贴图(仅OB可用)推荐使用以下预设参数:
$detail detail\noise_detail_01 // 适用于砖墙、混凝土等... $detailscale 7.74 $detailblendfactor 0.8 $detailblendmode 0
$detail detail\metal_detail_01 $detailscale 4.283 $detailblendfactor .65 $detailblendmode 0
$detail detail\rock_detail_01 $detailscale 11 $detailblendfactor 1 $detailblendmode 0
$detail detail\plaster_detail_01 $detailscale 6.783 $detailblendfactor .8 $detailblendmode 0
以下参数来自models\props_forest\LadderWood.vmt,是唯一使用detail\wood_detail_01(1024×1024高分辨率)的官方材质文件,因此$detailscale
较低(除rock_detail_01外):
$detail detail\wood_detail_01 $detailscale 2.563 $detailblendfactor .8 $detailblendmode 0
另有detail\detailash001a和detail\detaildirt001a两个贴图曾用于"泄露版" 半衰期2及
半衰期2:第一章的以下材质:
半衰期2:第一章材质Concrete/concretefloor009a参数:
$detail detail/detaildirt001a $detailscale 0.27
半衰期2:第一章材质Metal/metalfloor005a参数:
$detail detail/detailash001a $detailscale 0.50
另见
使用细节贴图隐藏重复平铺 - 如何通过$detail减少贴图重复感