* -wtf: During bsp to map conversion use common/WTF on faces with failed texture alignment deduction

This commit is contained in:
Garux
2025-10-20 15:33:04 +05:00
parent ee3ac80a62
commit e919276f52
6 changed files with 9 additions and 1 deletions
@@ -331,6 +331,7 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<li><strong><code>-readbsp</code>:</strong> Force converting bsp to selected format</li>
<li><strong><code>-readmap</code>:</strong> Force converting map to selected format</li>
<li><strong><code>-shadersasbitmap</code>:</strong> Save shader names as bitmap names in the model so it works as a prefab (only when writing ase and obj)</li>
<li><strong><code>-wtf</code>:</strong> During bsp to map conversion use common/WTF on faces with failed texture alignment deduction</li>
</ul>
+1
View File
@@ -187,6 +187,7 @@ Q3map2:
* support distinct lighting from different sky shaders in one map (by Tom Arrow)
* -onesky: fallback to old behavior: any sky emits total of all suns/skylights in the map
* -modelclip: Decompile model autoclip brushes during bsp to map conversion (they are skipped by default)
* -wtf: During bsp to map conversion use common/WTF on faces with failed texture alignment deduction
+3
View File
@@ -1110,6 +1110,9 @@ int ConvertBSPMain( Args& args ){
while ( args.takeArg( "-modelclip" ) ) {
g_decompile_modelClip = true;
}
while ( args.takeArg( "-wtf" ) ) {
g_decompile_wtf = true;
}
}
LoadShaderInfo();
+2 -1
View File
@@ -594,7 +594,8 @@ static void ConvertBrush( FILE *f, int bspBrushNum, const Vector3& origin, bool
}
else
{
if ( !striEqualPrefix( buildSide.shaderInfo->shader, "textures/common/" )
if ( g_decompile_wtf
&& !striEqualPrefix( buildSide.shaderInfo->shader, "textures/common/" )
&& !striEqualPrefix( buildSide.shaderInfo->shader, "textures/system/" )
&& !strEqual( buildSide.shaderInfo->shader, "noshader" )
&& !strEqual( buildSide.shaderInfo->shader, "default" ) ) {
+1
View File
@@ -323,6 +323,7 @@ static void HelpConvert()
{ "-readbsp", "Force converting bsp to selected format" },
{ "-readmap", "Force converting map to selected format" },
{ "-shadersasbitmap", "Save shader names as bitmap names in the model so it works as a prefab (only when writing ase and obj)" },
{ "-wtf", "During bsp to map conversion use common/WTF on faces with failed texture alignment deduction" },
};
HelpOptions( "Converting & Decompiling", 0, 80, options );
+1
View File
@@ -1778,6 +1778,7 @@ inline bool shadersAsBitmap;
inline bool lightmapsAsTexcoord;
// bsp to map conversion
inline bool g_decompile_modelClip;
inline bool g_decompile_wtf;
/* general commandline arguments */
inline bool force;