当前位置:雨林木风下载站 > 游戏攻略教程 > 详细页面

帝国全面战争 修改贴 如何去掉讨厌的弹道 也就是传说中的白尾巴

帝国全面战争 修改贴 如何去掉讨厌的弹道 也就是传说中的白尾巴

更新时间:2023-03-27 文章作者:未知 信息来源:网络 阅读次数:

电脑大家应该不怎么陌生吧!现在电脑已经普及到大多数人的家庭之中了,电脑的用途非常地广,不同年龄段、不同行业的人对电脑的用处不同。但是对于很多的年轻人来说电脑最大的用途就是玩游戏了。电脑游戏大家肯定玩过吧!它可以使人上瘾。

相关推荐:《帝国全面战争》专题

  相信很多人看到炮弹或子弹后面拖着长长的白色弹道都很不爽
  这里转一个老外的修改教程大家可以时一试

  建议备份原文件

  首先解压缩main.pack里的东西到帝国安装目录下的data文件夹,然后把main.pack改名成extension.pack

  然后在...datafx里找到projectiletrail.fx文件 用文本编辑器打开

  打开文件后 你应该能看到如下内容 如果内容不符(这也是有可能发生的) 请放弃

  #include "FXConfig.h"

  #include "Camera.fx_fragment"
  #include "ScreenEffects.fx_fragment"
  #include "fog.fx_fragment"

  struct VS_INPUT
  {
  float4        position                                        : POSITION;
  float3        tangent                                                : NORMAL;
  float4        colour                                                : COLOR0;
  float        width                                                : TEXCOORD0;
  float        t                                                        : TEXCOORD1;
  float        u                                                        : TEXCOORD2;
  float        min_apparent_width_distance        : TEXCOORD3;
  float        fade_out_distance                        : TEXCOORD4;
  float        cross_fade_start_distance        : TEXCOORD5;
  float        cross_fade_range                        : TEXCOORD6;
  };

  struct VS_OUTPUT
  {
  float4                position                                        : POSITION;
  float4                colour                                                : COLOR;
  float                u                                                        : TEXCOORD0;
  float                fade_out_distance                        : TEXCOORD1;
  float                distance                                        : TEXCOORD2;       
  float                t                                                        : TEXCOORD3;
  float4                proj_pos                                        : TEXCOORD4;
  float                cross_fade_start_distance        : TEXCOORD5;
  float                cross_fade_range                        : TEXCOORD6;
  };


  DECLARE_TEXTURE(normal_map);
  const bool                render_normal_map;

  VS_OUTPUT render_vertex(const VS_INPUT v)
  {
  VS_OUTPUT r;

  float3 to_camera        = camera_position - v.position;

  float3 normal                = normalize(cross(to_camera, v.tangent));

  float4 position                = v.position;

  float distance                = length(to_camera);

  float width = v.width;

  float apparent_width = width / min(distance, v.min_apparent_width_distance);

  width = apparent_width * distance;

  width *= 1.0f - v.t;

  position.xyz                += normal * (width * 0.5f) * v.u;

  r.proj_pos = r.position                        = mul(position, view_projection);
  r.colour.rgb                = v.colour.rgb;

  r.colour.a                        = lerp(v.colour.a, 0.0f, v.t);

  r.u                                        = v.u;
  r.t                                        = v.t;

  r.fade_out_distance                        = v.fade_out_distance;
  r.distance                                        = distance;
  r.cross_fade_start_distance        = v.cross_fade_start_distance;
  r.cross_fade_range                        = v.cross_fade_range;

  return r;
  }

  float4 render_pixel(VS_OUTPUT v) : COLOR
  {
  float dist_fade_out                = v.fade_out_distance / v.distance;
  dist_fade_out                        = clamp( dist_fade_out, 0.0f, 1.0f );

  float width_fade_out        = 1.0 - abs( v.u );

  float4 colour                        = v.colour;

  float cross_fade_t                = saturate((v.distance - v.cross_fade_start_distance) / v.cross_fade_range);

  if(render_normal_map)
  {
  float4 nn = tex2D(s_normal_map, v.proj_pos.xy/30 - float2(0, time_in_sec*0.05f));//float2(v.u/40, v.t*1 - time_in_sec*0.05f));
  colour.rgb = nn.rgb;
  cross_fade_t = 1.0f - cross_fade_t;
  }

  colour.a                        *= width_fade_out * dist_fade_out * cross_fade_t;

  return hdr_encode(colour);
  }

  technique projectile_alpha_sm2
  {
  pass p0
  {
  VertexShader = compile vs_2_0 render_vertex();
  PixelShader         = compile ps_2_0 render_pixel();

  ZWRITEENABLE                                = false;
  ALPHABLENDENABLE                        = TRUE;
  SRCBLEND                                        = SRCALPHA;
  DESTBLEND                                        = INVSRCALPHA;
  }
  }

  technique projectile_add_sm2
  {
  pass p0
  {
  VertexShader = compile vs_2_0 render_vertex();
  PixelShader         = compile ps_2_0 render_pixel();

  ZWRITEENABLE                                = false;
  ALPHABLENDENABLE                        = TRUE;
  SRCBLEND                                        = SRCALPHA;
  DESTBLEND                                        = ONE;
  }
  }

  technique projectile_subtract_sm2
  {
  pass p0
  {
  VertexShader = compile vs_2_0 render_vertex();
  PixelShader         = compile ps_2_0 render_pixel();

  ZWRITEENABLE                                = false;
  ALPHABLENDENABLE                        = TRUE;
  BLENDOP                                                = REVSUBTRACT;
  SRCBLEND                                        = SRCALPHA;
  DESTBLEND                                        = ONE;
  }
  }


  现在可以用下面的代码覆盖粘贴进去 注意不要单纯地清空文件 否则会造成跳出
  #include "FXConfig.h"

  #include "Camera.fx_fragment"
  #include "ScreenEffects.fx_fragment"
  #include "fog.fx_fragment"

  struct VS_INPUT
  {
  float4        position                                        : POSITION;
  float3        tangent                                                : NORMAL;
  float4        colour                                                : COLOR0;
  float        width                                                : TEXCOORD0;
  float        t                                                        : TEXCOORD1;
  float        u                                                        : TEXCOORD2;
  float        min_apparent_width_distance        : TEXCOORD3;
  float        fade_out_distance                        : TEXCOORD4;
  float        cross_fade_start_distance        : TEXCOORD5;
  float        cross_fade_range                        : TEXCOORD6;
  };

  struct VS_OUTPUT
  {
  float4                position                                        : POSITION;
  float4                colour                                                : COLOR;
  float                u                                                        : TEXCOORD0;
  float                fade_out_distance                        : TEXCOORD1;
  float                distance                                        : TEXCOORD2;       
  float                t                                                        : TEXCOORD3;
  float4                proj_pos                                        : TEXCOORD4;
  float                cross_fade_start_distance        : TEXCOORD5;
  float                cross_fade_range                        : TEXCOORD6;
  };


  DECLARE_TEXTURE(normal_map);
  const bool                render_normal_map;

  VS_OUTPUT render_vertex(const VS_INPUT v)
  {
  }

  float4 render_pixel(VS_OUTPUT v) : COLOR
  {
  }

  technique projectile_alpha_sm2
  {
  }

  technique projectile_add_sm2
  {
  }

  technique projectile_subtract_sm2
  {
  }

  一定要注意备份哦


玩游戏可以在很大程度上让大家放松放松,但是我建议大家不要把过多的时间投入到工作当中,因为这样的话大家很有可能上瘾,这样不利于大家的工作或者是学习。

温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行