Radiant:
misc...
* texbro: disable alpha transparency by def; isn't good in half of cases
* find/replace: tooltip helper note about search mode
* Entity: arrowheads, showing direction of connection-lines in addition to color-code; New algorithm: are visible in all orthogonal projections
* tweak: do not render 'misc_model' & 'light' entity names
* filters: patches: +filter ones with surfaceparm playerclip
* translucent filter also works for shaders with qer_alphafunc
* filter areaportal, if single face matches (allows case with other faces, using 'skip')
* filter translucent, if single face matches
* filter liquids by surfaceparm {water, lava, slime} in addition to textures/liquids path
This commit is contained in:
parent
dce6730b39
commit
a62c7302d3
|
|
@ -31,14 +31,13 @@ enum
|
|||
QER_NOCARVE = 1 << 1,
|
||||
QER_NODRAW = 1 << 2,
|
||||
QER_NONSOLID = 1 << 3,
|
||||
QER_WATER = 1 << 4,
|
||||
QER_LAVA = 1 << 5,
|
||||
QER_FOG = 1 << 6,
|
||||
QER_ALPHATEST = 1 << 7,
|
||||
QER_CULL = 1 << 8,
|
||||
QER_AREAPORTAL = 1 << 9,
|
||||
QER_CLIP = 1 << 10,
|
||||
QER_BOTCLIP = 1 << 11,
|
||||
QER_LIQUID = 1 << 4,
|
||||
QER_FOG = 1 << 5,
|
||||
QER_ALPHATEST = 1 << 6,
|
||||
QER_CULL = 1 << 7,
|
||||
QER_AREAPORTAL = 1 << 8,
|
||||
QER_CLIP = 1 << 9,
|
||||
QER_BOTCLIP = 1 << 10,
|
||||
};
|
||||
|
||||
struct qtexture_t;
|
||||
|
|
|
|||
|
|
@ -1145,7 +1145,7 @@ void renderSolid( Renderer& renderer, const VolumeTest& volume, const Matrix4& l
|
|||
}
|
||||
void renderWireframe( Renderer& renderer, const VolumeTest& volume, const Matrix4& localToWorld, bool selected ) const {
|
||||
renderSolid( renderer, volume, localToWorld, selected );
|
||||
if ( g_showNames ) {
|
||||
if ( g_showNames && !string_equal( m_named.name(), "light" ) ) {
|
||||
renderer.addRenderable( m_renderName, localToWorld );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ void renderSolid( Renderer& renderer, const VolumeTest& volume, const Matrix4& l
|
|||
}
|
||||
void renderWireframe( Renderer& renderer, const VolumeTest& volume, const Matrix4& localToWorld, bool selected ) const {
|
||||
renderSolid( renderer, volume, localToWorld, selected );
|
||||
if ( g_showNames ) {
|
||||
if ( g_showNames && !string_equal( m_named.name(), "misc_model" ) ) {
|
||||
renderer.addRenderable( m_renderName, localToWorld );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,9 +184,57 @@ TargetLinesPushBack( RenderablePointVector& targetLines, const Vector3& worldPos
|
|||
m_targetLines( targetLines ), m_worldPosition( worldPosition ), m_volume( volume ){
|
||||
}
|
||||
void operator()( const Vector3& worldPosition ) const {
|
||||
if ( m_volume.TestLine( segment_for_startend( m_worldPosition, worldPosition ) ) ) {
|
||||
Vector3 dir( worldPosition - m_worldPosition );//end - start
|
||||
double len = vector3_length( dir );
|
||||
if ( len != 0 && m_volume.TestLine( segment_for_startend( m_worldPosition, worldPosition ) ) ) {
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( m_worldPosition ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( worldPosition ) ) );
|
||||
|
||||
Vector3 mid( ( worldPosition + m_worldPosition ) * 0.5f );
|
||||
//vector3_normalise( dir );
|
||||
dir /= len;
|
||||
Vector3 hack( 0.57735, 0.57735, 0.57735 );
|
||||
int maxI = 0;
|
||||
float max = 0;
|
||||
for ( int i = 0; i < 3 ; ++i ){
|
||||
if ( dir[i] < 0 ){
|
||||
hack[i] *= -1;
|
||||
}
|
||||
if ( fabs( dir[i] ) > max ){
|
||||
maxI = i;
|
||||
}
|
||||
}
|
||||
hack[maxI] *= -1;
|
||||
|
||||
Vector3 ort( vector3_cross( dir, hack ) );
|
||||
//vector3_normalise( ort );
|
||||
Vector3 wing1( mid - dir*12 + ort*6 );
|
||||
Vector3 wing2( wing1 - ort*12 );
|
||||
|
||||
if( len <= 512 || len > 768 ){
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( mid ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( wing1 ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( mid ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( wing2 ) ) );
|
||||
}
|
||||
if( len > 512 ){
|
||||
Vector3 wing1_delta( mid - wing1 );
|
||||
Vector3 wing2_delta( mid - wing2 );
|
||||
Vector3 point( m_worldPosition + dir*256 );
|
||||
wing1 = point - wing1_delta;
|
||||
wing2 = point - wing2_delta;
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( point ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( wing1 ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( point ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( wing2 ) ) );
|
||||
point = worldPosition - dir*256;
|
||||
wing1 = point - wing1_delta;
|
||||
wing2 = point - wing2_delta;
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( point ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( wing1 ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( point ) ) );
|
||||
m_targetLines.push_back( PointVertex( reinterpret_cast<const Vertex3f&>( wing2 ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -253,7 +301,7 @@ RenderableTargetingEntity( TargetingEntity& targets )
|
|||
}
|
||||
void compile( const VolumeTest& volume, const Vector3& world_position ) const {
|
||||
m_target_lines.clear();
|
||||
m_target_lines.reserve( m_targets.size() * 2 );
|
||||
m_target_lines.reserve( m_targets.size() * 14 );
|
||||
TargetingEntity_forEach( m_targets, TargetLinesPushBack( m_target_lines, world_position, volume ) );
|
||||
}
|
||||
void render( Renderer& renderer, const VolumeTest& volume, const Vector3& world_position ) const {
|
||||
|
|
|
|||
|
|
@ -633,7 +633,7 @@ bool ShaderTemplate::parseDoom3( Tokeniser& tokeniser ){
|
|||
m_nFlags |= QER_NONSOLID;
|
||||
}
|
||||
else if ( string_equal_nocase( token, "liquid" ) ) {
|
||||
m_nFlags |= QER_WATER;
|
||||
m_nFlags |= QER_LIQUID;
|
||||
}
|
||||
else if ( string_equal_nocase( token, "areaportal" ) ) {
|
||||
m_nFlags |= QER_AREAPORTAL;
|
||||
|
|
@ -1266,11 +1266,10 @@ bool ShaderTemplate::parseQuake3( Tokeniser& tokeniser ){
|
|||
else if ( string_equal_nocase( surfaceparm, "nonsolid" ) ) {
|
||||
m_nFlags |= QER_NONSOLID;
|
||||
}
|
||||
else if ( string_equal_nocase( surfaceparm, "water" ) ) {
|
||||
m_nFlags |= QER_WATER;
|
||||
}
|
||||
else if ( string_equal_nocase( surfaceparm, "lava" ) ) {
|
||||
m_nFlags |= QER_LAVA;
|
||||
else if ( string_equal_nocase( surfaceparm, "water" ) ||
|
||||
string_equal_nocase( surfaceparm, "lava" ) ||
|
||||
string_equal_nocase( surfaceparm, "slime") ){
|
||||
m_nFlags |= QER_LIQUID;
|
||||
}
|
||||
else if ( string_equal_nocase( surfaceparm, "areaportal" ) ) {
|
||||
m_nFlags |= QER_AREAPORTAL;
|
||||
|
|
|
|||
|
|
@ -979,9 +979,12 @@ filter_brush_all_faces g_filter_brush_caulk( &g_filter_face_caulk );
|
|||
filter_face_shader_prefix g_filter_face_caulk_ja( "textures/system/caulk" );
|
||||
filter_brush_all_faces g_filter_brush_caulk_ja( &g_filter_face_caulk_ja );
|
||||
|
||||
filter_face_shader_prefix g_filter_face_liquids( "textures/liquids/" );
|
||||
filter_face_flags g_filter_face_liquids( QER_LIQUID );
|
||||
filter_brush_any_face g_filter_brush_liquids( &g_filter_face_liquids );
|
||||
|
||||
filter_face_shader_prefix g_filter_face_liquidsdir( "textures/liquids/" );
|
||||
filter_brush_any_face g_filter_brush_liquidsdir( &g_filter_face_liquidsdir );
|
||||
|
||||
filter_face_shader g_filter_face_hint( "textures/common/hint" );
|
||||
filter_brush_any_face g_filter_brush_hint( &g_filter_face_hint );
|
||||
|
||||
|
|
@ -995,7 +998,7 @@ filter_face_shader g_filter_face_hint_ja( "textures/system/hint" );
|
|||
filter_brush_any_face g_filter_brush_hint_ja( &g_filter_face_hint_ja );
|
||||
|
||||
filter_face_shader g_filter_face_areaportal( "textures/common/areaportal" );
|
||||
filter_brush_all_faces g_filter_brush_areaportal( &g_filter_face_areaportal );
|
||||
filter_brush_any_face g_filter_brush_areaportal( &g_filter_face_areaportal );
|
||||
|
||||
filter_face_shader g_filter_face_visportal( "textures/editor/visportal" );
|
||||
filter_brush_any_face g_filter_brush_visportal( &g_filter_face_visportal );
|
||||
|
|
@ -1006,8 +1009,8 @@ filter_brush_all_faces g_filter_brush_clusterportal( &g_filter_face_clusterporta
|
|||
filter_face_shader g_filter_face_lightgrid( "textures/common/lightgrid" );
|
||||
filter_brush_all_faces g_filter_brush_lightgrid( &g_filter_face_lightgrid );
|
||||
|
||||
filter_face_flags g_filter_face_translucent( QER_TRANS );
|
||||
filter_brush_all_faces g_filter_brush_translucent( &g_filter_face_translucent );
|
||||
filter_face_flags g_filter_face_translucent( QER_TRANS | QER_ALPHATEST );
|
||||
filter_brush_any_face g_filter_brush_translucent( &g_filter_face_translucent );
|
||||
|
||||
filter_face_contents g_filter_face_detail( BRUSH_DETAIL_MASK );
|
||||
filter_brush_all_faces g_filter_brush_detail( &g_filter_face_detail );
|
||||
|
|
@ -1028,6 +1031,7 @@ void BrushFilters_construct(){
|
|||
add_face_filter( g_filter_face_caulk, EXCLUDE_CAULK );
|
||||
add_face_filter( g_filter_face_caulk_ja, EXCLUDE_CAULK );
|
||||
add_brush_filter( g_filter_brush_liquids, EXCLUDE_LIQUIDS );
|
||||
add_brush_filter( g_filter_brush_liquidsdir, EXCLUDE_LIQUIDS );
|
||||
add_brush_filter( g_filter_brush_hint, EXCLUDE_HINTSSKIPS );
|
||||
add_brush_filter( g_filter_brush_hintlocal, EXCLUDE_HINTSSKIPS );
|
||||
add_brush_filter( g_filter_brush_hint_q2, EXCLUDE_HINTSSKIPS );
|
||||
|
|
|
|||
|
|
@ -169,7 +169,8 @@ GtkWindow* FindTextureDialog::BuildDialog(){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
|
||||
|
||||
label = gtk_label_new( "Replace:" );
|
||||
label = gtk_label_new( "Replace:*" );
|
||||
gtk_widget_set_tooltip_text( label, "Empty = search mode" );
|
||||
gtk_widget_show( label );
|
||||
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
|
||||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
|
|
@ -187,6 +188,7 @@ GtkWindow* FindTextureDialog::BuildDialog(){
|
|||
GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) );
|
||||
|
||||
entry = gtk_entry_new();
|
||||
gtk_widget_set_tooltip_text( entry, "Empty = search mode" );
|
||||
gtk_widget_show( entry );
|
||||
gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
|
||||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
|
||||
|
|
|
|||
|
|
@ -774,13 +774,15 @@ bool filter( const Patch& patch ) const {
|
|||
|
||||
|
||||
filter_patch_all g_filter_patch_all;
|
||||
filter_patch_shader g_filter_patch_clip( "textures/common/clip" );
|
||||
filter_patch_flags g_filter_patch_clip( QER_CLIP );
|
||||
filter_patch_shader g_filter_patch_commonclip( "textures/common/clip" );
|
||||
filter_patch_shader g_filter_patch_weapclip( "textures/common/weapclip" );
|
||||
filter_patch_flags g_filter_patch_translucent( QER_TRANS );
|
||||
filter_patch_flags g_filter_patch_translucent( QER_TRANS | QER_ALPHATEST );
|
||||
|
||||
void PatchFilters_construct(){
|
||||
add_patch_filter( g_filter_patch_all, EXCLUDE_CURVES );
|
||||
add_patch_filter( g_filter_patch_clip, EXCLUDE_CLIP );
|
||||
add_patch_filter( g_filter_patch_commonclip, EXCLUDE_CLIP );
|
||||
add_patch_filter( g_filter_patch_weapclip, EXCLUDE_CLIP );
|
||||
add_patch_filter( g_filter_patch_translucent, EXCLUDE_TRANSLUCENT );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ namespace
|
|||
bool g_TextureBrowser_shaderlistOnly = false;
|
||||
bool g_TextureBrowser_fixedSize = true;
|
||||
bool g_TextureBrowser_filterNotex = false;
|
||||
bool g_TextureBrowser_enableAlpha = true;
|
||||
bool g_TextureBrowser_enableAlpha = false;
|
||||
}
|
||||
|
||||
class DeferredAdjustment
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<item name="Mouse Shortcuts" url="docs/Mouse Shortcuts.txt"/>
|
||||
<item name="Additional map compiler features" url="docs/Additional_map_compiler_features.htm"/>
|
||||
<item name="Additional map editor features" url="docs/Additional_map_editor_features.htm"/>
|
||||
<item name="Complete list of command line parameters" url="docs/Complete_list_of_command_line_parameters.htm"/>
|
||||
<item name="Complete list of Q3map2 command line parameters" url="docs/Complete_list_of_command_line_parameters.htm"/>
|
||||
<item name="Complete list of entity keys" url="docs/Complete_list_of_entity_keys.htm"/>
|
||||
<item name="Complete list of shader keywords" url="docs/Complete_list_of_shader_keywords.htm"/>
|
||||
<item name="Q3Map2 - FS20 - R5 readme" url="docs/fsr_readme.txt"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user