Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: Valathil on August 21, 2011, 11:21:40 am

Title: Thrusters and explosions
Post by: Valathil on August 21, 2011, 11:21:40 am
To avoid another Disco incident Im gonna put a test build here. Look at it and tell me if theres anything wrong. I cant make a patch cuz tortoise svn only tell me the changes to my last commit not to the repository any help there would also be appreciated

http://www.mediafire.com/?2eb0q2gb2j629b4
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 11:27:38 am
It says the address isn't valid when I click the link to download it.
Works now, I'll take a look at it. :D
Title: Re: Thrusters and explosions
Post by: Bobboau on August 21, 2011, 11:28:20 am
right click on directory->click on show log->right click on revision you want a diff against->show as unified diff

IIRC
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 11:45:04 am
Woo gAyTI strikes again with royally disgusting visual ****ups.

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/DistortionDerp1.png)
Here what's supposed to be thruster distortion is putting holes all over my Perseus, and covering up that Orion and the Hecate behind said Orion in a giant black box.

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/DistortionDerp2.png)
And here, instead of a heat wave, the entire Massive Battle area is engulfed in a black circle of nothing. At least almost anyway, that last bit of the Hatshesput can still be seen but as the shockwave expanded it eventually was covered as well.

I'd log it but only an r.exe was provided.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 12:28:21 pm
try this : http://www.mediafire.com/?wsps9a9pv19mxax
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 12:38:32 pm
Unfortunately that had no effect. :(
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 12:56:07 pm
Unfortunately that had no effect. :(

Did it at least remove the artifacts on the perseus
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 01:02:24 pm
Artifacts are still present.
Title: Re: Thrusters and explosions
Post by: Some14U on August 21, 2011, 01:06:13 pm
What AMD card and driver you are running on?
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 01:09:09 pm
5870 on 11.4, I read 11.5 had other issues and using 11.6 gave me transparency issues. I haven't tried 11.7 or 11.8 yet though I'm sceptical as all hell to even touching them.
Title: Re: Thrusters and explosions
Post by: The E on August 21, 2011, 01:13:09 pm
11.8 at least is pretty good so far.
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 01:19:31 pm
I'll give it a try then.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 01:20:17 pm
how about now fixed a shader issue: http://www.mediafire.com/?q0c5vexyfxkmpgw

and got a patch
Code: [Select]
Index: code/cmdline/cmdline.cpp
===================================================================
--- code/cmdline/cmdline.cpp (revision 7508)
+++ code/cmdline/cmdline.cpp (working copy)
@@ -172,6 +172,7 @@
 
  { "-ingame_join", "Allow in-game joining", true, 0, EASY_DEFAULT, "Experimental", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-ingame_join", },
  { "-voicer", "Enable voice recognition", true, 0, EASY_DEFAULT, "Experimental", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-voicer", },
+ { "-fb_explosions", "Enable Framebuffer Shockwaves", true, 0, EASY_DEFAULT, "Experimental", "", },
 
  { "-fps", "Show frames per second on HUD", false, 0, EASY_DEFAULT, "Dev Tool", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-fps", },
  { "-pos", "Show position of camera", false, 0, EASY_DEFAULT, "Dev Tool", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-pos", },
@@ -267,6 +268,7 @@
 cmdline_parm bloom_intensity_arg("-bloom_intensity", NULL);
 cmdline_parm fxaa_arg("-fxaa", NULL);
 cmdline_parm fxaa_preset_arg("-fxaa_preset", NULL);
+cmdline_parm fb_explosions_arg("-fb_explosions", NULL);
 
 float Cmdline_clip_dist = Default_min_draw_distance;
 float Cmdline_fov = 0.75f;
@@ -289,6 +291,7 @@
 bool Cmdline_fxaa = false;
 int Cmdline_fxaa_preset = 6;
 extern int Fxaa_preset_last_frame;
+bool Cmdline_fb_explosions = 0;
 
 // Game Speed related
 cmdline_parm cache_bitmaps_arg("-cache_bitmaps", NULL); // Cmdline_cache_bitmaps
@@ -1429,6 +1432,11 @@
  Cmdline_softparticles = 1;
  }
 
+ if ( fb_explosions_arg.found() )
+ {
+ Cmdline_fb_explosions = 1;
+ }
+
  if ( postprocess_arg.found() )
  {
  Cmdline_postprocess = 1;
Index: code/cmdline/cmdline.h
===================================================================
--- code/cmdline/cmdline.h (revision 7508)
+++ code/cmdline/cmdline.h (working copy)
@@ -76,6 +76,7 @@
 extern int Cmdline_bloom_intensity;
 extern bool Cmdline_fxaa;
 extern int Cmdline_fxaa_preset;
+extern bool Cmdline_fb_explosions;
 
 // Game Speed related
 extern int Cmdline_cache_bitmaps;
Index: code/globalincs/def_files.cpp
===================================================================
--- code/globalincs/def_files.cpp (revision 7508)
+++ code/globalincs/def_files.cpp (working copy)
@@ -2194,10 +2194,16 @@
 uniform float nearZ; \n\
 uniform float farZ; \n\
  \n\
-varying float radius; \n\
+varying float radius; \n\
+ \n\
+#ifdef FLAG_DISTORTION \n\
+uniform sampler2D distMap; \n\
+uniform sampler2D frameBuffer; \n\
+#endif \n\
  \n\
 void main() \n\
 { \n\
+ #ifndef FLAG_DISTORTION \n\
  vec2 offset = vec2( \n\
  radius * abs(0.5 - gl_TexCoord[0].x) * 2.0, \n\
  radius * abs(0.5 - gl_TexCoord[0].y) * 2.0 \n\
@@ -2236,5 +2242,17 @@
  fragmentColor = fragmentColor * ( ds / (depthOffset*2.0) ); \n\
  \n\
  gl_FragColor = fragmentColor; \n\
+ #else \n\
+ vec2 depthCoord = vec2( \n\
+ gl_FragCoord.x / window_width, \n\
+ gl_FragCoord.y / window_height \n\
+ ); \n\
+ vec4 fragmentColor = texture2D(baseMap, gl_TexCoord[0].xy)*gl_Color.a; \n\
+ vec2 distortion = texture2D(distMap, gl_TexCoord[0].xy).rg; \n\
+ float alpha = clamp(dot(fragmentColor.rgb,vec3(0.3333))*5.0,0.0,1.0); \n\
+ distortion = ((distortion - 0.5) * 0.01) * alpha; \n\
+ gl_FragColor = texture2D(frameBuffer,depthCoord+distortion); \n\
+ gl_FragColor.a = alpha; \n\
+ #endif \n\
 } \n\
 ";
\ No newline at end of file
Index: code/graphics/grbatch.cpp
===================================================================
--- code/graphics/grbatch.cpp (revision 7508)
+++ code/graphics/grbatch.cpp (working copy)
@@ -405,6 +405,7 @@
 {
  vec3d p[4];
  vertex *P = &vert[n_to_render * 3];
+ float *R = &radius_list[n_to_render * 3];
 
  vec3d fvec, uvecs, uvece, evec;
 
@@ -456,10 +457,11 @@
 
  for(int i = 0; i < 6; i++){
  P[i].r = P[i].g = P[i].b = P[i].a = _color;
+ R[i] = width;
  }
 
  n_to_render += 2;
- use_radius = false;
+ use_radius = true;
 }
 
 float geometry_batcher::draw_laser(vec3d *p0, float width1, vec3d *p1, float width2, int r, int g, int b)
@@ -559,10 +561,8 @@
 void geometry_batcher::render(int flags, float radius)
 {
  if (n_to_render) {
- if ( (flags & TMAP_FLAG_SOFT_QUAD) && Cmdline_softparticles && use_radius ) {
- int zbuff = gr_zbuffer_set(GR_ZBUFF_NONE);
+ if ( (((flags & TMAP_FLAG_SOFT_QUAD) && Cmdline_softparticles)) || (flags & TMAP_FLAG_DISTORTION) || (flags & TMAP_FLAG_DISTORTION_THRUSTER) && use_radius ) {
  gr_render_effect(n_to_render * 3, vert, radius_list, flags | TMAP_FLAG_TRILIST);
- gr_zbuffer_set(zbuff);
  } else {
  gr_render(n_to_render * 3, vert, flags | TMAP_FLAG_TRILIST);
  }
@@ -714,7 +714,14 @@
  continue;
 
  Assert( bi->texture >= 0 );
- gr_set_bitmap(bi->texture, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, bi->alpha);
+ if(bi->tmap_flags & TMAP_FLAG_DISTORTION)
+ {
+ gr_set_bitmap(bi->texture, GR_ALPHABLEND_NONE, GR_BITBLT_MODE_NORMAL, bi->alpha);
+ }
+ else
+ {
+ gr_set_bitmap(bi->texture, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, bi->alpha);
+ }
  bi->batch.render( bi->tmap_flags);
  }
 }
Index: code/graphics/gropengldraw.cpp
===================================================================
--- code/graphics/gropengldraw.cpp (revision 7508)
+++ code/graphics/gropengldraw.cpp (working copy)
@@ -32,12 +32,17 @@
 #include "nebula/neb.h"
 #include "graphics/gropenglshader.h"
 #include "graphics/gropenglpostprocessing.h"
+#include "freespace2/freespace.h"
 
 GLuint Scene_framebuffer;
 GLuint Scene_color_texture;
 GLuint Scene_effect_texture;
 GLuint Scene_depth_texture;
 
+GLuint Distortion_framebuffer;
+GLuint Distortion_texture[2];
+int Distortion_switch = 0;
+
 int Scene_texture_initialized;
 bool Scene_framebuffer_in_frame;
 
@@ -1269,7 +1274,7 @@
  float u_scale = 1.0f, v_scale = 1.0f;
  GLenum gl_mode = GL_TRIANGLE_FAN;
  int attrib_index = -1;
-
+ int zbuff,zbuffsaved=0;
  GL_CHECK_FOR_ERRORS("start of render3d()");
 
  Assert(Scene_depth_texture != 0);
@@ -1278,8 +1283,38 @@
 
  if ( flags & TMAP_FLAG_TEXTURED ) {
  if ( flags & TMAP_FLAG_SOFT_QUAD ) {
- int sdr_index = opengl_shader_get_index(SDR_FLAG_SOFT_QUAD);
- opengl_shader_set_current(&GL_shader[sdr_index]);
+ int sdr_index;
+ if( (flags & TMAP_FLAG_DISTORTION) || (flags & TMAP_FLAG_DISTORTION_THRUSTER) )
+ {
+ glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
+ sdr_index = opengl_shader_get_index(SDR_FLAG_SOFT_QUAD|SDR_FLAG_DISTORTION);
+ opengl_shader_set_current(&GL_shader[sdr_index]);
+
+ vglUniform1iARB(opengl_shader_get_uniform("frameBuffer"), 2);
+
+ GL_state.Texture.SetActiveUnit(2);
+ GL_state.Texture.SetTarget(GL_TEXTURE_2D);
+ GL_state.Texture.Enable(Scene_effect_texture);
+ GL_state.Texture.SetActiveUnit(3);
+ GL_state.Texture.SetTarget(GL_TEXTURE_2D);
+ if(flags & TMAP_FLAG_DISTORTION_THRUSTER)
+ {
+ vglUniform1iARB(opengl_shader_get_uniform("distMap"), 3);
+ GL_state.Texture.Enable(Distortion_texture[!Distortion_switch]);
+ }
+ else
+ {
+ vglUniform1iARB(opengl_shader_get_uniform("distMap"), 0);
+ GL_state.Texture.Disable();
+ }
+ }
+ else
+ {
+ sdr_index = opengl_shader_get_index(SDR_FLAG_SOFT_QUAD);
+ opengl_shader_set_current(&GL_shader[sdr_index]);
+ zbuff = gr_zbuffer_set(GR_ZBUFF_NONE);
+ zbuffsaved = 1;
+ }
 
  vglUniform1iARB(opengl_shader_get_uniform("baseMap"), 0);
  vglUniform1iARB(opengl_shader_get_uniform("depthMap"), 1);
@@ -1308,6 +1343,7 @@
 
  GLboolean cull_face = GL_state.CullFace(GL_FALSE);
  GLboolean lighting = GL_state.Lighting(GL_FALSE);
+ GLboolean mask = GL_state.DepthMask(GL_FALSE);
 
  if (flags & TMAP_FLAG_TRILIST) {
  gl_mode = GL_TRIANGLES;
@@ -1338,6 +1374,12 @@
  GL_state.Texture.SetActiveUnit(1);
  GL_state.Texture.Disable();
 
+ GL_state.Texture.SetActiveUnit(2);
+ GL_state.Texture.Disable();
+
+ GL_state.Texture.SetActiveUnit(3);
+ GL_state.Texture.Disable();
+
  glDisableClientState(GL_TEXTURE_COORD_ARRAY);
  glDisableClientState(GL_VERTEX_ARRAY);
  glDisableClientState(GL_COLOR_ARRAY);
@@ -1348,7 +1390,13 @@
 
  GL_state.CullFace(cull_face);
  GL_state.Lighting(lighting);
+ GL_state.DepthMask(mask);
+ if(zbuffsaved)
+ gr_zbuffer_set(zbuff);
 
+ GLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT };
+ vglDrawBuffers(2, buffers);
+
  GL_CHECK_FOR_ERRORS("end of render3d()");
 }
 
@@ -1924,13 +1972,6 @@
 {
  Scene_texture_initialized = 0;
 
- if ( !Cmdline_postprocess && !Cmdline_softparticles ) {
- Scene_color_texture = 0;
- Scene_effect_texture = 0;
- Scene_depth_texture = 0;
- return;
- }
-
  if ( !Use_GLSL || Cmdline_no_fbo || !Is_Extension_Enabled(OGL_EXT_FRAMEBUFFER_OBJECT) ) {
  Cmdline_postprocess = 0;
  Cmdline_softparticles = 0;
@@ -2045,6 +2086,50 @@
  return;
  }
 
+ //Setup thruster distortion framebuffer
+ vglGenFramebuffersEXT(1, &Distortion_framebuffer);
+ vglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, Distortion_framebuffer);
+
+ glGenTextures(2, Distortion_texture);
+
+ GL_state.Texture.SetActiveUnit(0);
+ GL_state.Texture.SetTarget(GL_TEXTURE_2D);
+ GL_state.Texture.Enable(Distortion_texture[0]);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 32, 32, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
+
+ GL_state.Texture.Enable(Distortion_texture[1]);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 32, 32, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
+
+ vglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, Distortion_texture[0], 0);
+
+
+
+ if ( opengl_check_framebuffer() ) {
+ vglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ vglDeleteFramebuffersEXT(1, &Distortion_framebuffer);
+ Distortion_framebuffer = 0;
+
+ GL_state.Texture.Disable();
+
+ glDeleteTextures(2, Distortion_texture);
+ Scene_color_texture = 0;
+ return;
+ }
+
  if ( opengl_check_for_errors("post_init_framebuffer()") ) {
  Scene_color_texture = 0;
  Scene_depth_texture = 0;
@@ -2086,6 +2171,17 @@
  Scene_framebuffer = 0;
  }
 
+ if ( Distortion_texture ) {
+ glDeleteTextures(2, Distortion_texture);
+ Distortion_texture[0] = 0;
+ Distortion_texture[1] = 0;
+ }
+
+ if ( Distortion_framebuffer ) {
+ vglDeleteFramebuffersEXT(1, &Distortion_framebuffer);
+ Distortion_framebuffer = 0;
+ }
+
  Scene_texture_initialized = 0;
  Scene_framebuffer_in_frame = false;
 }
@@ -2111,12 +2207,20 @@
  Scene_framebuffer_in_frame = true;
 }
 
+float time_buffer = 0.0f;
 void gr_opengl_scene_texture_end()
 {
  if ( !Scene_framebuffer_in_frame ) {
  return;
  }
-
+
+ time_buffer+=flFrametime;
+ if(time_buffer>0.03f)
+ {
+ gr_opengl_update_distortion();
+ time_buffer = 0.0f;
+ }
+
  if ( Cmdline_postprocess && !PostProcessing_override ) {
  gr_post_process_end();
  } else {
@@ -2163,3 +2267,62 @@
 
  Scene_framebuffer_in_frame = false;
 }
+
+void gr_opengl_update_distortion()
+{
+ GLboolean depth = GL_state.DepthTest(GL_FALSE);
+ GLboolean depth_mask = GL_state.DepthMask(GL_FALSE);
+ GLboolean light = GL_state.Lighting(GL_FALSE);
+ GLboolean blend = GL_state.Blend(GL_FALSE);
+ GLboolean cull = GL_state.CullFace(GL_FALSE);
+
+ opengl_shader_set_current();
+ vglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, Distortion_framebuffer);
+ vglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, Distortion_texture[!Distortion_switch], 0);
+ glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
+
+ glViewport(0,0,32,32);
+ GL_state.Texture.SetActiveUnit(0);
+ GL_state.Texture.SetTarget(GL_TEXTURE_2D);
+ GL_state.Texture.Enable(Distortion_texture[Distortion_switch]);
+ glClearColor(0.5f, 0.5f, 0.0f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+
+ glBegin(GL_QUADS);
+ glTexCoord2f(0.0f, 0.0f);
+ glVertex2f(0.03f*(float)gr_screen.max_w,(float)gr_screen.max_h);
+
+ glTexCoord2f(0.96875f, 0.0f);
+ glVertex2f((float)gr_screen.max_w, (float)gr_screen.max_h);
+
+ glTexCoord2f(0.96875f, 1.0f);
+ glVertex2f((float)gr_screen.max_w, 0.0f);
+
+ glTexCoord2f(0.0f, 1.0f);
+ glVertex2f(0.03f*(float)gr_screen.max_w, 0.0f);
+ glEnd();
+ GL_state.Texture.Disable();
+ glBegin(GL_POINTS);
+ for(int i = 0; i < 33; i++)
+ {
+ glColor4ub(rand()%256, rand()%256 ,255, 255);
+ glVertex2f(0.04f, (float)gr_screen.max_h*0.03125f*i);
+ }
+ glEnd();
+ Distortion_switch = !Distortion_switch;
+
+ // reset state
+ vglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, Scene_framebuffer);
+
+ glViewport(0,0,gr_screen.max_w,gr_screen.max_h);
+
+ GLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT };
+ vglDrawBuffers(2, buffers);
+
+ GL_state.DepthTest(depth);
+ GL_state.DepthMask(depth_mask);
+ GL_state.Lighting(light);
+ GL_state.Blend(blend);
+ GL_state.CullFace(cull);
+}
Index: code/graphics/gropengldraw.h
===================================================================
--- code/graphics/gropengldraw.h (revision 7508)
+++ code/graphics/gropengldraw.h (working copy)
@@ -32,6 +32,7 @@
 void gr_opengl_render(int nverts, vertex *verts, uint flags);
 void gr_opengl_render_effect(int nverts, vertex *verts, float *radius_list, uint flags);
 void gr_opengl_bitmap_ex(int x, int y, int w, int h, int sx, int sy, bool resize);
+void gr_opengl_update_distortion();
 
 void opengl_render_timer_bar(int colour, float x, float y, float w, float h);
 void opengl_set_spec_mapping(int tmap_type, float *u_scale, float *v_scale, int stage = 0);
Index: code/graphics/gropenglshader.cpp
===================================================================
--- code/graphics/gropenglshader.cpp (revision 7508)
+++ code/graphics/gropenglshader.cpp (working copy)
@@ -305,7 +305,10 @@
  4, { "sSpecmap", "sNormalmap", "sHeightmap", "n_lights" }, 0, { NULL } }*/
 
  { "soft-v.sdr", "soft-f.sdr", (SDR_FLAG_SOFT_QUAD),
- 6, {"baseMap", "depthMap", "window_width", "window_height", "nearZ", "farZ"}, 1, { "radius_in" } }
+ 6, {"baseMap", "depthMap", "window_width", "window_height", "nearZ", "farZ"}, 1, { "radius_in" } },
+
+ { "soft-v.sdr", "soft-f.sdr", (SDR_FLAG_SOFT_QUAD | SDR_FLAG_DISTORTION),
+ 8, {"baseMap", "depthMap", "window_width", "window_height", "nearZ", "farZ", "distMap", "frameBuffer"}, 1, { "radius_in" } }
 };
 
 static const int Num_shader_files = sizeof(GL_shader_file) / sizeof(opengl_shader_file_t);
@@ -440,6 +443,10 @@
  if (flags & SDR_FLAG_ANIMATED) {
  sflags += "#define FLAG_ANIMATED\n";
  }
+
+ if (flags & SDR_FLAG_DISTORTION) {
+ sflags += "#define FLAG_DISTORTION\n";
+ }
  }
 
 
Index: code/graphics/gropenglshader.h
===================================================================
--- code/graphics/gropenglshader.h (revision 7508)
+++ code/graphics/gropenglshader.h (working copy)
@@ -36,6 +36,7 @@
 #define SDR_FLAG_ENV_MAP (1<<15)
 #define SDR_FLAG_ANIMATED (1<<16)
 #define SDR_FLAG_SOFT_QUAD (1<<17)
+#define SDR_FLAG_DISTORTION (1<<18)
 
 #define MAX_SHADER_UNIFORMS 15
 
Index: code/graphics/tmapper.h
===================================================================
--- code/graphics/tmapper.h (revision 7508)
+++ code/graphics/tmapper.h (working copy)
@@ -78,6 +78,12 @@
 // use soft particle shader - Swifty
 #define TMAP_FLAG_SOFT_QUAD (1<<20)
 
+// use framebuffer distortion mapping with generated distortion map - Valathil
+#define TMAP_FLAG_DISTORTION_THRUSTER (1<<21)
+
+// use framebuffer distortion mapping  - Valathil
+#define TMAP_FLAG_DISTORTION (1<<22)
+
 #define TMAP_ADDRESS_WRAP 1
 #define TMAP_ADDRESS_MIRROR 2
 #define TMAP_ADDRESS_CLAMP 3
Index: code/model/modelinterp.cpp
===================================================================
--- code/model/modelinterp.cpp (revision 7508)
+++ code/model/modelinterp.cpp (working copy)
@@ -2527,8 +2527,8 @@
 // Int3();
 }
 
-geometry_batcher primary_thruster_batcher, secondary_thruster_batcher, tertiary_thruster_batcher;
-
+geometry_batcher primary_thruster_batcher, secondary_thruster_batcher, tertiary_thruster_batcher, distortion_thruster_batcher;
+extern bool Scene_framebuffer_in_frame;
 // maybe draw mode thruster glows
 void model_render_thrusters(polymodel *pm, int objnum, ship *shipp, matrix *orient, vec3d *pos)
 {
@@ -2566,6 +2566,7 @@
 
  if (Interp_secondary_thrust_glow_bitmap >= 0) {
  secondary_thruster_batcher.allocate(n_q);
+ distortion_thruster_batcher.allocate(n_q);
  do_render = true;
  }
 
@@ -2758,6 +2759,11 @@
  }
 
  secondary_thruster_batcher.draw_beam(&pnt, &norm2, wVal*Interp_secondary_thrust_glow_rad_factor*0.5f, d);
+ if(Scene_framebuffer_in_frame)
+ {
+ vm_vec_scale_add(&norm2, &pnt, &fvec, wVal * 4 * Interp_thrust_glow_len_factor);
+ distortion_thruster_batcher.draw_beam(&pnt, &norm2, wVal*Interp_secondary_thrust_glow_rad_factor, 1.0f);
+ }
  }
  }
  // end secondary glows
@@ -2818,7 +2824,9 @@
  }*/
 
  if (Interp_secondary_thrust_glow_bitmap >= 0) {
- gr_set_bitmap(Interp_secondary_thrust_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f);
+ gr_set_bitmap(Interp_secondary_thrust_glow_bitmap, GR_ALPHABLEND_NONE, GR_BITBLT_MODE_NORMAL, 1.0f);
+ distortion_thruster_batcher.render(TMAP_FLAG_GOURAUD | TMAP_FLAG_RGB | TMAP_FLAG_TEXTURED | TMAP_FLAG_CORRECT | TMAP_HTL_3D_UNLIT | TMAP_FLAG_DISTORTION_THRUSTER | TMAP_FLAG_SOFT_QUAD);
+ gr_set_bitmap(Interp_secondary_thrust_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f);
  secondary_thruster_batcher.render(TMAP_FLAG_GOURAUD | TMAP_FLAG_RGB | TMAP_FLAG_TEXTURED | TMAP_FLAG_CORRECT | TMAP_HTL_3D_UNLIT);
  }
 
Index: code/weapon/shockwave.cpp
===================================================================
--- code/weapon/shockwave.cpp (revision 7508)
+++ code/weapon/shockwave.cpp (working copy)
@@ -92,6 +92,7 @@
 extern int Show_area_effect;
 extern int Cmdline_nohtl;
 extern int Cmdline_enable_3d_shockwave;
+extern bool Cmdline_fb_explosions;
 
 
 // ------------------------------------------------------------------------------------
@@ -464,20 +465,46 @@
  model_render( sw->model_id, &Objects[sw->objnum].orient, &sw->pos, MR_NO_LIGHTING | MR_NO_FOGGING | MR_NORMAL | MR_CENTER_ALPHA | MR_NO_CULL, sw->objnum);
 
  model_set_warp_globals();
+ if(Cmdline_fb_explosions)
+ {
+ g3_transfer_vertex(&p, &sw->pos);
+
+ batch_add_bitmap_rotated(
+ Shockwave_info[1].bitmap_id+shockwave_get_framenum(objp->instance, 94),
+ TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT | TMAP_FLAG_SOFT_QUAD | TMAP_FLAG_DISTORTION,
+ &p,
+ fl_radians(sw->rot_angles.p),
+ sw->radius,
+ ((sw->time_elapsed/sw->total_time)>0.9f)?(1.0f-(sw->time_elapsed/sw->total_time))*10.0f:1.0f
+ );
+ }
  }else{
  if (!Cmdline_nohtl) {
  g3_transfer_vertex(&p, &sw->pos);
  } else {
  g3_rotate_vertex(&p, &sw->pos);
  }
-
- batch_add_bitmap_rotated(
- sw->current_bitmap,
- TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT | TMAP_FLAG_SOFT_QUAD,
- &p,
- fl_radians(sw->rot_angles.p),
- sw->radius
- );
+ if(Cmdline_fb_explosions)
+ {
+ batch_add_bitmap_rotated(
+ sw->current_bitmap,
+ TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT | TMAP_FLAG_SOFT_QUAD | TMAP_FLAG_DISTORTION,
+ &p,
+ fl_radians(sw->rot_angles.p),
+ sw->radius,
+ ((sw->time_elapsed/sw->total_time)>0.9f)?(1.0f-(sw->time_elapsed/sw->total_time))*10.0f:1.0f
+ );
+ }
+ else
+ {
+ batch_add_bitmap_rotated(
+ sw->current_bitmap,
+ TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT | TMAP_FLAG_SOFT_QUAD,
+ &p,
+ fl_radians(sw->rot_angles.p),
+ sw->radius
+ );
+ }
  }
 }
 
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 01:36:30 pm
So far 11.8 didn't do anything positive, but at least it did nothing negative. I'm downloading the new .exe now and...I forgot what to do with the cmdline if anything is to be done with it.

Okay, I've got some progress now! The black boxes are gone so the effects are now showing, however I still get the artifacts.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 01:48:34 pm
could you post some screenies of the artifacts please. specifically on two angles. when the ship is covering the thrusters and a good angle where the thruster distorts something with a good contrast like a planet with a hires texture or something
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 01:50:17 pm
Okay, give me a moment I'll get some done.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 01:55:08 pm
great debug log doesnt help me anyway i need to see this
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 02:03:15 pm
Three different scenarios.

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/DistortionArtifacts1.png)
Along with the artifacts that show around the engines of ships artifacts from distant explosions are shown through the hull of other ships closer to you. Those specs on the Hatshesput's hull are from an engagement with a Ravana in front of it.

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/DistortionArtifacts2.png)
And then the artifacts on the engines that I showed on the earlier post, although this time as you can see the effect itself is working, from the glows above the Orion's hangarbay bending.

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/DistortionArtifacts3.png)
And artifacts from the exploding Cyclops I launched, would be easier to see with some sort of background but on the Ravana's tubes you can see where the shockwave is.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 02:31:50 pm
One question Zane, did you try the test build of swiftys soft particles. If not please do and tell me if you get the same artifacts. it kinda seems to me that this is a soft particle issue
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 02:34:57 pm
I have but I believe I didn't get the issue then. I'll have to try it again to double check.
Okay that isn't entirely true, the first release of that build had effects rendered as white squares, but after updating that problem went away. Doesn't mean I'm not going to try it again though.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 02:40:34 pm
then please disable fb_explosion and see if the artifacts still occur on explosions then it would be definitely the soft particles
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 02:42:59 pm
I'll do that, though trying the soft particles build there were no artifacts.
Title: Re: Thrusters and explosions
Post by: Rodo on August 21, 2011, 02:44:32 pm
works like charm for me :yes:

and now I'm actually wondering if getting an ATI card is a wise decision.
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 02:47:37 pm
With fb_explosion off (And on) I get the artifacts again.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 02:53:31 pm
With fb_explosion off (And on) I get the artifacts again.

on the thrusters or on the explosions?
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 02:59:36 pm
On thrusters.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 03:05:50 pm
ok ok so its definitely the distortion effect hmmmmmmmm. i currently at my wits end. but ill think about it. one thing though
run this mission and tell me if you get artifacts once the sathanas starts cloaking this was made with blueplanet2 mod active hopefully you have that

Code: [Select]
#Mission Info

$Version: 0.10
$Name:  XSTR("aaa", -1)
$Author: Microsoft
$Created: 07/05/11 at 19:03:00
$Modified: 08/04/11 at 19:14:47
$Notes:
This is a FRED2_OPEN created mission.
$End Notes:

$Mission Desc:
 XSTR("Put mission description here
", -1)
$end_multi_text

+Game Type Flags: 1

+Flags: 128

+Disallow Support: 0

+Hull Repair Ceiling: 0.000000

+Subsystem Repair Ceiling: 100.000000

+Viewer pos: -13808.654297, 2227.800781, 2949.279785
+Viewer orient:
-0.032212, -0.000000, -0.999481,
0.230627, 0.973014, -0.007433,
0.972509, -0.230747, -0.031343


$AI Profile: BP2

#Command Briefing

#Briefing
$start_briefing
$num_stages: 0
$end_briefing

#Debriefing_info

$Num stages: 0

#Players ;! 1 total

$Starting Shipname: GTF Ulysses 0
$Ship Choices: (
"GTF Ulysses" 5
"GTF Hercules" 5
"GTF Hercules Mark II" 5
"GTF Ares" 5
"GTF Erinyes" 5
"GTF Loki" 5
"GTF Pegasus" 5
"GTF Perseus" 5
"GTF Myrmidon" 5
"SF Mara (terrans)" 5
"GTB Artemis" 5
"GTB Artemis D.H." 5
"GTB Medusa" 5
"GTB Ursa" 5
"GTB Zeus" 5
"GTB Boanerges" 5
"GVF Ptah" 5
"GTF Aurora" 5
"GTF Kulas" 5
"Spacesuit" 5
"GTF Atalanta" 5
"GTF Nyx" 5
"UEF Uhlan" 5
"UEF Kentauroi" 5
"UEF Uriel" 5
"UEF Izra'il" 5
"UEF Lao Tze" 5
"UEB Durga" 5
)

+Weaponry Pool: (
"Subach HL-7" 16
"Subach HL-D" 16
"Mekhu HL-7" 16
"Mekhu HL-7D" 16
"Akheton SDG" 16
"Morning Star" 16
"MorningStar D" 16
"Prometheus R" 16
"Prometheus S" 16
"Prometheus D" 16
"Maxim" 16
"Maxim D" 16
"UD-8 Kayser" 16
"UD-D Kayser" 16
"Circe" 16
"Lamprey" 16
"Balor" 16
"Vishnan Primary" 16
"Vulcan" 16
"Maul" 16
"Rapier" 16
"Gattler" 16
"Scalpel" 16
"Sidhe" 16
"UX Accelerator" 16
"Cavalier" 16
"Archer" 16
"Redeemer" 16
"Vajra" 16
"Rockeye" 500
"Rockeye D" 500
"Tempest" 500
"Tempest D" 500
"Hornet" 500
"Hornet D" 500
"Tornado" 500
"Tornado D" 500
"Harpoon" 500
"Harpoon D" 500
"Trebuchet" 500
"TAG-A" 500
"TAG-B" 500
"TAG-C" 500
"Piranha" 500
"Stiletto II" 500
"Infyrno" 500
"Infyrno D" 500
"Cyclops" 500
"Cyclops#short" 500
"Helios" 500
"EMP Adv." 500
"Vishnan Missile" 500
"Vishnan Megabomb" 500
"Vishnan Ultrabomb" 500
"Javelin" 500
"Dart" 500
"Dirk" 500
"Slammer" 500
"Paveway" 500
"Hellfire" 500
"Shrike" 500
"Grimler" 500
"Warhammer" 500
"Sledgehammer" 500
"Jackhammer" 500
)

#Objects ;! 3 total

$Name: GTF Ulysses 0 ;! Object #0
$Class: GTF Ulysses
$Team: Friendly
$Location: -5837.034180, 0.000433, 1414.765503
$Orientation:
-0.512272, -0.011408, -0.858748,
0.118509, 0.989409, -0.083839,
0.850609, -0.144717, -0.505495
$AI Behavior: None
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Subsystem: Pilot
$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" "player-start" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Use Table Score:
+Score: 8

$Name: SD Ravana 1 ;! Object #1
$Class: GTVA Colossus
$Team: Hostile
$Location: 1454.423096, -88.798103, -2475.697510
$Orientation:
0.868151, 0.003227, -0.496323,
-0.056531, 0.994132, -0.092420,
0.493105, 0.108288, 0.863222
$AI Behavior: None
+AI Class: BALLS OF STEELE
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Initial Shields: 100
+Subsystem: Pilot
+Subsystem: turret01a
+Subsystem: turret02a
+Subsystem: turret03a
+Subsystem: turret04a
+Subsystem: turret05a
+Subsystem: turret06a
+Subsystem: turret07a
+Subsystem: turret08a
+Subsystem: turret09a
+Subsystem: turret10a
+Subsystem: turret11
+Subsystem: turret12
+Subsystem: turret13
+Subsystem: turret14
+Subsystem: turret15
+Subsystem: turret16
+Subsystem: turret17
+Subsystem: turret18
+Subsystem: turret19
+Subsystem: turret20
+Subsystem: turret21
+Subsystem: turret22
+Subsystem: turret23
+Subsystem: turret24
+Subsystem: turret25
+Subsystem: turret26
+Subsystem: turret27
+Subsystem: turret28
+Subsystem: turret29
+Subsystem: turret30
+Subsystem: turret31
+Subsystem: turret32
+Subsystem: turret33
+Subsystem: turret34
+Subsystem: turret35
+Subsystem: turret36
+Subsystem: turret37
+Subsystem: turret38
+Subsystem: turret39
+Subsystem: turret40
+Subsystem: turret41
+Subsystem: turret42
+Subsystem: turret43
+Subsystem: turret44
+Subsystem: turret45
+Subsystem: turret46
+Subsystem: turret47
+Subsystem: turret48
+Subsystem: turret49
+Subsystem: turret50
+Subsystem: turret51
+Subsystem: turret52
+Subsystem: turret53
+Subsystem: turret54
+Subsystem: turret55
+Subsystem: turret56
+Subsystem: turret57
+Subsystem: turret58
+Subsystem: turret59
+Subsystem: turret60
+Subsystem: turret61
+Subsystem: turret62
+Subsystem: turret63
$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "no-shields" "invulnerable" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Score: 670

$Name: GTVA Colossus 2 ;! Object #2
$Class: SJ Sathanas
$Team: Friendly
$Location: -1566.918823, -12.300336, 800.078491
$Orientation:
0.912870, -0.050919, -0.405069,
0.047844, 0.998700, -0.017718,
0.405444, -0.003206, 0.914117
$AI Behavior: None
$AI Goals: ( goals ( ai-chase "SD Ravana 1" 50 ) )
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Initial Shields: 100
+Subsystem: Pilot
+Subsystem: turret01
+Subsystem: turret02
+Subsystem: turret03
+Subsystem: turret04
+Subsystem: turret05
+Subsystem: turret06
+Subsystem: turret07
+Subsystem: turret08
+Subsystem: turret09
+Subsystem: turret10
+Subsystem: turret11
+Subsystem: turret12
+Subsystem: turret13
+Subsystem: turret14
+Subsystem: turret15
+Subsystem: turret16
+Subsystem: turret17
+Subsystem: turret18
+Subsystem: turret19
+Subsystem: turret20
+Subsystem: turret21
+Subsystem: turret22
+Subsystem: turret23
+Subsystem: turret24
+Subsystem: turret25
+Subsystem: turret26
+Subsystem: turret27
+Subsystem: turret28
+Subsystem: turret29
+Subsystem: turret30
+Subsystem: turret31
+Subsystem: turret32
+Subsystem: turret33
+Subsystem: turret34
+Subsystem: turret35
+Subsystem: turret36
+Subsystem: turret37
+Subsystem: turret38
+Subsystem: turret39
+Subsystem: turret40
+Subsystem: turret41
+Subsystem: turret42
+Subsystem: turret43
+Subsystem: turret44
+Subsystem: turret45
+Subsystem: turret46
+Subsystem: turret47
+Subsystem: turret48
+Subsystem: turret49
+Subsystem: turret50
+Subsystem: turret51
+Subsystem: turret52
+Subsystem: turret53
$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" "no-shields" "invulnerable" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Use Table Score:
+Score: 10000

#Wings ;! 0 total

#Events ;! 2 total

$Formula: ( when
   ( true )
   ( beam-free-all
      "SD Ravana 1"
      "GTVA Colossus 2"
   )
   ( turret-free-all "SD Ravana 1" )
)
+Name: Event name
+Repeat Count: 1
+Interval: 1
+Team: 2113

$Formula: ( when
   ( true )
   ( ship-effect
      "Cloak"
      8000
      "GTVA Colossus 2"
   )
)
+Name: Event name
+Repeat Count: 1
+Interval: 1
+Chained: 5
+Team: 0

#Goals ;! 0 total


#Waypoints ;! 0 lists total


#Messages ;! 0 total


#Reinforcements ;! 0 total


#Background bitmaps ;! 1 total

$Num stars: 500
$Ambient light level: 7895160

$Bitmap List:
$Sun: SunWhite
+Angles: 1.570795 0.000000 0.000000
+Scale: 1.000000
$Starbitmap: earthlikeplanet
+Angles: 0.000000 0.000000 4.712385
+ScaleX: 10.000000
+ScaleY: 10.000000
+DivX: 1
+DivY: 1

#Asteroid Fields

#Music

$Event Music: None
$Briefing Music: None

#End

Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 03:10:54 pm
There's no excuse to not having it. :P
Unless it would make your computer asplode.

Testing it...

Edit: I hit a snag trying to load the mission, preventing the Sathanas from cloaking:
Code: [Select]
Invalid ship effect name.

In sexpression: ( when
   ( true )
   ( ship-effect
      "Cloak"
      8000
      "GTVA Colossus 2"
   )
)
(Error appears to be: Cloak)
ntdll.dll! NtWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_13r_INF_SSE2.exe! <no symbol>
fs2_open_3_6_13r_INF_SSE2.exe! <no symbol>
fs2_open_3_6_13r_INF_SSE2.exe! <no symbol>
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 03:29:48 pm
use this as your data/tables/post_processing.tbl

Code: [Select]
#Effects

$Name: distort noise
$Uniform: noise_amount
$Define: FLAG_DISTORT_NOISE
$AlwaysOn: false
$Default: 0.0
$Div: 20000
$Add: 0

$Name: saturation
$Uniform: saturation
$Define: FLAG_SATURATION
$AlwaysOn: false
$Default: 0.9
$Div: 50
$Add: 0

$Name: contrast
$Uniform: contrast
$Define: FLAG_CONTRAST
$AlwaysOn: false
$Default: 1.1
$Div: 50
$Add: 0

$Name: film grain
$Uniform: film_grain
$Define: FLAG_GRAIN
$AlwaysOn: false
$Default: 0.1
$Div: 50
$Add: 0

$Name: stripes
$Uniform: tv_stripes
$Define: FLAG_STRIPES
$AlwaysOn: false
$Default: 0.0
$Div: 50
$Add: 0

$Name: cutoff
$Uniform: cutoff
$Define: FLAG_CUTOFF
$AlwaysOn: false
$Default: 2.0
$Div: 50
$Add: 0.0

$Name: dithering
$Uniform: dither
$Define: FLAG_DITH
$AlwaysOn: false
$Default: 0.0
$Div: 50
$Add: 0
#Ship Effects

$Name: Cloak
$Shader Effect: 2
$Disables Rendering: YES
$Invert timer: YES

$Name: Decloak
$Shader Effect: 2
$Disables Rendering: NO
$Invert timer: NO

#End
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 03:40:48 pm
That did it.

When looking at the Sathanas and Colossus at the same time from the starting position, there were artifacts.
During and after cloak, there were no artifacts.
Looking at the Sathanas and Colossus individually, there were no artifacts, maybe it's a distance thing since my own fighter still had artifacts when I looked at it.
I'm being quite the pest I'm sure...
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 03:49:22 pm
You said during the cloak there werent artifacts you mean that before there were artifacts on the thrusters and when the cloak started they dissapeared?
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 04:02:31 pm
Yes, but I'm confused at how the Colossus had no artifacts when I flew close to it but my fighter did.
I can get more screens if you want.

I also tried seeing if deleting the soft_particle.patch would do anything just in case, nothing changed.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 04:06:12 pm
that file is just for applying the code patch so you can compile your own build the engine doesnt recognize the file at all but please more screens please of my mission i sent you
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 04:24:51 pm
(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/ProblemPersists1.png)
I'm sorry about this one, when I'm moving the ship about it looks like there's a lot more artifacts but once I screen it i only get very few, thus my having to put circles around them.

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/ProblemPersists2.png)
We start cloaking, and no artifacts occur.

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/ProblemPersists3.png)
Taking a closer look at the Colossus, nothing out of the ordinary.

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/ProblemPersists4.png)
However when I view my own fighter...

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/ProblemPersists5.png)
I decide to get the Sathanas without the Colossus around it, and it appears without artifacts like the Colossus does on the third image.
But now the Colossus is showing artifacts, I imagine the Sathanas might do the same should I get within the right distance and angle.

At the least out of the whole thing your cloak effect doesn't display artifacts, but I'm getting the usual problem that I've been having.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 04:36:48 pm
http://www.mediafire.com/?58l8nkkn45tb6ih try this, this will make the thrusters dissapear but maybe still display the artifacts i would like to know if they still appear.
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 04:52:33 pm
No more artifacts.
Tried it with fb_explosion, no artifacts either.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 04:53:35 pm
no more artifacts on explosions? even though you have fb explosions? and they render the distortions????? could you join the scp channel on esper.net IRC?
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 04:55:22 pm
That is correct. No engine distortion as you mentioned, but I can turn on explosion distortion and it shows properly without artifacts.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 05:00:34 pm
im not sure about that try looking at your ship against a bright background while an explosion is happening
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 05:15:56 pm
I didn't catch any artifacts this time as well.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 05:19:05 pm
ok this is kinda bad you know why. I have no friggin idea left why this happens now.
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 05:40:13 pm
I'll give 11.7 drivers a shot and see if that does anything, that's about the only remaining option for me outside of lolgetnvidia.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 05:44:49 pm
ok last shot: http://www.mediafire.com/?ajp758mu3duc598

otherwise(http://img86.imageshack.us/img86/4301/nvidiaroundgs9.png)
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 05:57:59 pm
Okay, I get engine artifacts but no explosion / shockwave artifacts in this release.
I'll downgrade to 11.7 drivers and see if I get lucky.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 06:44:08 pm
swifty gave me a tip and i know whats "wrong" i can fix it but it will take some time
Title: Re: Thrusters and explosions
Post by: Bobboau on August 21, 2011, 06:47:15 pm
what was it?
Title: Re: Thrusters and explosions
Post by: Zacam on August 21, 2011, 07:12:22 pm

I made a "Retail" (read: doesn't require BluePlanet) version of the cloaking mission.
Really, the only reason why it wanted BP was the AI, background bitmap, and that it had all the ships and weapons in the loadout available.

Code: (Cloak Test.fs2) [Select]
#Mission Info

$Version: 0.10
$Name:  XSTR("Cloak Test", -1)
$Author: Microsoft
$Created: 07/05/11 at 19:03:00
$Modified: 08/04/11 at 19:14:47
$Notes:
This is a FRED2_OPEN created mission.
$End Notes:

$Mission Desc:
 XSTR("Put mission description here", -1)
$end_multi_text

+Game Type Flags: 1
+Flags: 128
+Disallow Support: 0
+Hull Repair Ceiling: 0.000000
+Subsystem Repair Ceiling: 100.000000

+Viewer pos: -13808.654297, 2227.800781, 2949.279785
+Viewer orient:
-0.032212, -0.000000, -0.999481,
0.230627, 0.973014, -0.007433,
0.972509, -0.230747, -0.031343

$Skybox Model: starfield.pof
$AI Profile: FS2 Retail

#Command Briefing

#Briefing
$start_briefing
$num_stages: 0
$end_briefing

#Debriefing_info

$Num stages: 0

#Players ;! 1 total

$Starting Shipname: GTF Ulysses 0
$Ship Choices: (
"GTF Ulysses" 5
"GTF Hercules" 5
"GTF Hercules Mark II" 5
"GTF Ares" 5
"GTF Erinyes" 5
"GTF Loki" 5
"GTF Pegasus" 5
"GTF Perseus" 5
"GTF Myrmidon" 5
"SF Mara (terrans)" 5
"GTB Artemis" 5
"GTB Artemis D.H." 5
"GTB Medusa" 5
"GTB Ursa" 5
"GTB Zeus" 5
"GTB Boanerges" 5
"GVF Ptah" 5
)

+Weaponry Pool: (
"Subach HL-7" 16
"Mekhu HL-7" 16
"Akheton SDG" 16
"Morning Star" 16
"Prometheus R" 16
"Prometheus S" 16
"Maxim" 16
"UD-8 Kayser" 16
"Circe" 16
"Lamprey" 16
"Rockeye" 500
"Tempest" 500
"Hornet" 500
"Tornado" 500
"Harpoon" 500
"Trebuchet" 500
"TAG-A" 500
"TAG-B" 500
"TAG-C" 500
"Piranha" 500
"Stiletto II" 500
"Infyrno" 500
"Cyclops" 500
"Helios" 500
"EMP Adv." 500
)

#Objects ;! 3 total

$Name: GTF Ulysses 0 ;! Object #0
$Class: GTF Ulysses
$Team: Friendly
$Location: -5837.034180, 0.000433, 1414.765503
$Orientation:
-0.512272, -0.011408, -0.858748,
0.118509, 0.989409, -0.083839,
0.850609, -0.144717, -0.505495
$AI Behavior: None
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Subsystem: Pilot
$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" "player-start" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Use Table Score:
+Score: 8

$Name: Hostile ;! Object #1
$Class: GTVA Colossus
$Team: Hostile
$Location: 1454.423096, -88.798103, -2475.697510
$Orientation:
0.868151, 0.003227, -0.496323,
-0.056531, 0.994132, -0.092420,
0.493105, 0.108288, 0.863222
$AI Behavior: None
+AI Class: Major
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Subsystem: Pilot
+Subsystem: turret01a
+Subsystem: turret02a
+Subsystem: turret03a
+Subsystem: turret04a
+Subsystem: turret05a
+Subsystem: turret06a
+Subsystem: turret07a
+Subsystem: turret08a
+Subsystem: turret09a
+Subsystem: turret10a
+Subsystem: turret11
+Subsystem: turret12
+Subsystem: turret13
+Subsystem: turret14
+Subsystem: turret15
+Subsystem: turret16
+Subsystem: turret17
+Subsystem: turret18
+Subsystem: turret19
+Subsystem: turret20
+Subsystem: turret21
+Subsystem: turret22
+Subsystem: turret23
+Subsystem: turret24
+Subsystem: turret25
+Subsystem: turret26
+Subsystem: turret27
+Subsystem: turret28
+Subsystem: turret29
+Subsystem: turret30
+Subsystem: turret31
+Subsystem: turret32
+Subsystem: turret33
+Subsystem: turret34
+Subsystem: turret35
+Subsystem: turret36
+Subsystem: turret37
+Subsystem: turret38
+Subsystem: turret39
+Subsystem: turret40
+Subsystem: turret41
+Subsystem: turret42
+Subsystem: turret43
+Subsystem: turret44
+Subsystem: turret45
+Subsystem: turret46
+Subsystem: turret47
+Subsystem: turret48
+Subsystem: turret49
+Subsystem: turret50
+Subsystem: turret51
+Subsystem: turret52
+Subsystem: turret53
+Subsystem: turret54
+Subsystem: turret55
+Subsystem: turret56
+Subsystem: turret57
+Subsystem: turret58
+Subsystem: turret59
+Subsystem: turret60
+Subsystem: turret61
+Subsystem: turret62
+Subsystem: turret63
$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "invulnerable" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Score: 670

$Name: Friendly ;! Object #2
$Class: SJ Sathanas
$Team: Friendly
$Location: -1566.918823, -12.300336, 800.078491
$Orientation:
0.912870, -0.050919, -0.405069,
0.047844, 0.998700, -0.017718,
0.405444, -0.003206, 0.914117
$AI Behavior: None
$AI Goals: ( goals ( ai-chase "Hostile" 50 ) )
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Subsystem: Pilot
+Subsystem: turret01
+Subsystem: turret02
+Subsystem: turret03
+Subsystem: turret04
+Subsystem: turret05
+Subsystem: turret06
+Subsystem: turret07
+Subsystem: turret08
+Subsystem: turret09
+Subsystem: turret10
+Subsystem: turret11
+Subsystem: turret12
+Subsystem: turret13
+Subsystem: turret14
+Subsystem: turret15
+Subsystem: turret16
+Subsystem: turret17
+Subsystem: turret18
+Subsystem: turret19
+Subsystem: turret20
+Subsystem: turret21
+Subsystem: turret22
+Subsystem: turret23
+Subsystem: turret24
+Subsystem: turret25
+Subsystem: turret26
+Subsystem: turret27
+Subsystem: turret28
+Subsystem: turret29
+Subsystem: turret30
+Subsystem: turret31
+Subsystem: turret32
+Subsystem: turret33
+Subsystem: turret34
+Subsystem: turret35
+Subsystem: turret36
+Subsystem: turret37
+Subsystem: turret38
+Subsystem: turret39
+Subsystem: turret40
+Subsystem: turret41
+Subsystem: turret42
+Subsystem: turret43
+Subsystem: turret44
+Subsystem: turret45
+Subsystem: turret46
+Subsystem: turret47
+Subsystem: turret48
+Subsystem: turret49
+Subsystem: turret50
+Subsystem: turret51
+Subsystem: turret52
+Subsystem: turret53
$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" "invulnerable" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Use Table Score:
+Score: 10000

#Wings ;! 0 total

#Events ;! 2 total

$Formula: ( when
   ( true )
   ( beam-free-all
      "Hostile"
      "Friendly"
   )
   ( turret-free-all "Hostile" )
)
+Name: Event name
+Repeat Count: 1
+Interval: 1
+Team: 2113

$Formula: ( when
   ( true )
   ( ship-effect
      "Cloak"
      8000
      "Friendly"
   )
)
+Name: Event name
+Repeat Count: 1
+Interval: 1
+Chained: 5
+Team: 0

#Goals ;! 0 total


#Waypoints ;! 0 lists total


#Messages ;! 0 total


#Reinforcements ;! 0 total


#Background bitmaps ;! 1 total

$Num stars: 500
$Ambient light level: 7895160

$Bitmap List:
$Sun: SunWhite
+Angles: 1.570795 0.000000 0.000000
+Scale: 1.000000
$Starbitmap: PlanetH
+Angles: 0.000000 0.000000 4.712385
+ScaleX: 8.000000
+ScaleY: 8.000000
+DivX: 1
+DivY: 1

#Asteroid Fields

#Music

$Event Music: None
$Briefing Music: None

#End
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 07:14:53 pm
I certainly look foward to it then, since 11.7 didn't change anything either.
So far, 5870s can't take the effects on any driver.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 07:17:22 pm
Swifty told me he had the same problem when implementing his soft particles. He solved it by delaying the rendering of the sprites to the end of the pipeline. My thrusters however were drawn right when the model was drawn so this apparently caused it. I dont know WHY it happens i just know i have to delay the rendering to fix it. Something ATI weird is the cause.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 07:36:42 pm
Please let this be it: http://www.mediafire.com/?0i5ji1p3wk52202

oh and one thing the thrusterglows are now distorted by the framebuffer as well id like to know if this is visually better than before.
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 07:38:19 pm
I'll take a look at it, probably once I'm done watching Priest.
(Pretty good so far)
Title: Re: Thrusters and explosions
Post by: Bobboau on August 21, 2011, 08:04:17 pm
oh, if that's the cause, then now would be a good time to move the thruster rendering into a geometry batcher, I had done this once before, but it got reverted IIRC, it provided a noticeable performance gain as well.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 08:05:58 pm
swifty did that but only for primaries and tertiary thruster glows. cause secondaries never intersect with the ship he apparently thought he wouldnt need to make them soft. so when i did the thruster distortions i used the same instant drawing code as the secondaries and that apparently doesnt quite work with ati cards.
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 08:35:55 pm
The artifacts have finally ceased to be!

(http://i97.photobucket.com/albums/l223/SpootKnight/FreeSpace/ShockwaveDerp.png)
However another contender appears to laugh at our face...
Though I'm still rolled back so I can go back to 11.8 to see what the difference is. Not all hope is lost (And much more is gained at this point).
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 08:46:16 pm
oh for fcks sake but at least i know whats wrong
Title: Re: Thrusters and explosions
Post by: Bobboau on August 21, 2011, 08:46:47 pm
looks like everything behind the poly has been double drawn.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 08:48:34 pm
yeah cause sprites are normally additive blended and for distortions you have to turn that off. i do turn it off for the thrusters but the shockwaves still use the old geometry batcher not my new distortion only one so bang everything gets doubled
Title: Re: Thrusters and explosions
Post by: Bobboau on August 21, 2011, 08:51:12 pm
well, at least that's an easy fix.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 09:21:53 pm
Here it is: http://www.mediafire.com/?z2d987qwntmhnpw

I actually added back the old shockwaves in addition to the new framebuffer effect let me know what you think of the combination
Title: Re: Thrusters and explosions
Post by: Commander Zane on August 21, 2011, 09:30:41 pm
You have no idea how many Internets you deserve.
No artifacts, no boxes, nothing.

I'm looking at nothing but awesome now.
Nighteye's shockwaves with this effect looks damn good.
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 09:35:25 pm
I deserve many internets cuase this bug drove me to the edge of insanity. I still dont know WHY it happens and only on ATI. Glad its finished now though
Title: Re: Thrusters and explosions
Post by: Bobboau on August 21, 2011, 09:39:58 pm
probably your shader was writing something odd to the zbuffer (due to ATI's fail drivers)
Title: Re: Thrusters and explosions
Post by: Valathil on August 21, 2011, 09:56:05 pm
probably your shader was writing something odd to the zbuffer (due to ATI's fail drivers)

NO zbuffer is read only while drawing thrusters. Thats why its soo frigging odd. It looks definitely like a zbuffer issue but there's no way that the things write to the buffer. I think ATI's fbo depth buffer implementation is somehow broken but I still cant think how and why.
Title: Re: Thrusters and explosions
Post by: Bobboau on August 21, 2011, 10:06:02 pm
maybe the brokenness is that fact that it is writing to it at all?
Title: Re: Thrusters and explosions
Post by: Zacam on August 21, 2011, 10:40:32 pm

So, I realized that the Retail Cloak Test was a little borked. You couldn't change the player ship.

Fixed that, so here is version 2.

Code: (Cloak Test 2.fs2) [Select]
#Mission Info

$Version: 0.10
$Name:  XSTR("Cloak Test", -1)
$Author: Microsoft
$Created: 07/05/11 at 19:03:00
$Modified: 08/04/11 at 19:14:47
$Notes:
This is a FRED2_OPEN created mission.
$End Notes:

$Mission Desc:
 XSTR("Put mission description here", -1)
$end_multi_text

+Game Type Flags: 1
+Flags: 128
+Disallow Support: 0
+Hull Repair Ceiling: 0.000000
+Subsystem Repair Ceiling: 100.000000

+Viewer pos: -13808.654297, 2227.800781, 2949.279785
+Viewer orient:
-0.032212, -0.000000, -0.999481,
0.230627, 0.973014, -0.007433,
0.972509, -0.230747, -0.031343

$Skybox Model: starfield.pof
$AI Profile: FS2 Retail

#Command Briefing

#Briefing
$start_briefing
$num_stages: 0
$end_briefing

#Debriefing_info

$Num stages: 0

#Players ;! 1 total

$Starting Shipname: Alpha 1
$Ship Choices: (
"GTF Ulysses" 5
"GTF Hercules" 5
"GTF Hercules Mark II" 5
"GTF Ares" 5
"GTF Erinyes" 5
"GTF Loki" 5
"GTF Pegasus" 5
"GTF Perseus" 5
"GTF Myrmidon" 5
"SF Mara (terrans)" 5
"GTB Artemis" 5
"GTB Artemis D.H." 5
"GTB Medusa" 5
"GTB Ursa" 5
"GTB Zeus" 5
"GTB Boanerges" 5
"GVF Ptah" 5
)

+Weaponry Pool: (
"Subach HL-7" 16
"Mekhu HL-7" 16
"Akheton SDG" 16
"Morning Star" 16
"Prometheus R" 16
"Prometheus S" 16
"Maxim" 16
"UD-8 Kayser" 16
"Circe" 16
"Lamprey" 16
"Rockeye" 500
"Tempest" 500
"Hornet" 500
"Tornado" 500
"Harpoon" 500
"Trebuchet" 500
"TAG-A" 500
"TAG-B" 500
"TAG-C" 500
"Piranha" 500
"Stiletto II" 500
"Infyrno" 500
"Cyclops" 500
"Helios" 500
"EMP Adv." 500
)

#Objects ;! 3 total

$Name: Alpha 1 ;! Object #0
$Class: GTF Ulysses
$Team: Friendly
$Location: -5837.034180, 0.000433, 1414.765503
$Orientation:
-0.512272, -0.011408, -0.858748,
0.118509, 0.989409, -0.083839,
0.850609, -0.144717, -0.505495
$AI Behavior: None
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Subsystem: Pilot
$Arrival Location: Hyperspace
$Arrival Cue: ( false )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" "player-start" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Score: 8

$Name: Hostile ;! Object #1
$Class: GTVA Colossus
$Team: Hostile
$Location: 1454.423096, -88.798103, -2475.697510
$Orientation:
0.868151, 0.003227, -0.496323,
-0.056531, 0.994132, -0.092420,
0.493105, 0.108288, 0.863222
$AI Behavior: None
+AI Class: Major
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Subsystem: Pilot
+Subsystem: turret01a
+Subsystem: turret02a
+Subsystem: turret03a
+Subsystem: turret04a
+Subsystem: turret05a
+Subsystem: turret06a
+Subsystem: turret07a
+Subsystem: turret08a
+Subsystem: turret09a
+Subsystem: turret10a
+Subsystem: turret11
+Subsystem: turret12
+Subsystem: turret13
+Subsystem: turret14
+Subsystem: turret15
+Subsystem: turret16
+Subsystem: turret17
+Subsystem: turret18
+Subsystem: turret19
+Subsystem: turret20
+Subsystem: turret21
+Subsystem: turret22
+Subsystem: turret23
+Subsystem: turret24
+Subsystem: turret25
+Subsystem: turret26
+Subsystem: turret27
+Subsystem: turret28
+Subsystem: turret29
+Subsystem: turret30
+Subsystem: turret31
+Subsystem: turret32
+Subsystem: turret33
+Subsystem: turret34
+Subsystem: turret35
+Subsystem: turret36
+Subsystem: turret37
+Subsystem: turret38
+Subsystem: turret39
+Subsystem: turret40
+Subsystem: turret41
+Subsystem: turret42
+Subsystem: turret43
+Subsystem: turret44
+Subsystem: turret45
+Subsystem: turret46
+Subsystem: turret47
+Subsystem: turret48
+Subsystem: turret49
+Subsystem: turret50
+Subsystem: turret51
+Subsystem: turret52
+Subsystem: turret53
+Subsystem: turret54
+Subsystem: turret55
+Subsystem: turret56
+Subsystem: turret57
+Subsystem: turret58
+Subsystem: turret59
+Subsystem: turret60
+Subsystem: turret61
+Subsystem: turret62
+Subsystem: turret63
$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" "invulnerable" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Score: 670

$Name: Friendly ;! Object #2
$Class: SJ Sathanas
$Team: Friendly
$Location: -1566.918823, -12.300336, 800.078491
$Orientation:
0.912870, -0.050919, -0.405069,
0.047844, 0.998700, -0.017718,
0.405444, -0.003206, 0.914117
$AI Behavior: None
$AI Goals: ( goals ( ai-chase "Hostile" 50 ) )
$Cargo 1:  XSTR("Nothing", -1)
+Initial Hull: 100
+Subsystem: Pilot
+Subsystem: turret01
+Subsystem: turret02
+Subsystem: turret03
+Subsystem: turret04
+Subsystem: turret05
+Subsystem: turret06
+Subsystem: turret07
+Subsystem: turret08
+Subsystem: turret09
+Subsystem: turret10
+Subsystem: turret11
+Subsystem: turret12
+Subsystem: turret13
+Subsystem: turret14
+Subsystem: turret15
+Subsystem: turret16
+Subsystem: turret17
+Subsystem: turret18
+Subsystem: turret19
+Subsystem: turret20
+Subsystem: turret21
+Subsystem: turret22
+Subsystem: turret23
+Subsystem: turret24
+Subsystem: turret25
+Subsystem: turret26
+Subsystem: turret27
+Subsystem: turret28
+Subsystem: turret29
+Subsystem: turret30
+Subsystem: turret31
+Subsystem: turret32
+Subsystem: turret33
+Subsystem: turret34
+Subsystem: turret35
+Subsystem: turret36
+Subsystem: turret37
+Subsystem: turret38
+Subsystem: turret39
+Subsystem: turret40
+Subsystem: turret41
+Subsystem: turret42
+Subsystem: turret43
+Subsystem: turret44
+Subsystem: turret45
+Subsystem: turret46
+Subsystem: turret47
+Subsystem: turret48
+Subsystem: turret49
+Subsystem: turret50
+Subsystem: turret51
+Subsystem: turret52
+Subsystem: turret53
$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" "invulnerable" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Score: 10000

#Wings ;! 0 total

$Name: Alpha
$Waves: 1
$Wave Threshold: 0
$Special Ship: 0

$Arrival Location: Hyperspace
$Arrival Cue: ( true )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Ships: ( ;! 1 total
"Alpha 1"
)
+Hotkey: 0
+Flags:( )

#Events ;! 2 total

$Formula: ( when
   ( true )
   ( beam-free-all
      "Hostile"
      "Friendly"
   )
   ( turret-free-all "Hostile" )
)
+Name: Event name
+Repeat Count: 1
+Interval: 1
+Team: 0

$Formula: ( when
   ( true )
   ( ship-effect
      "Cloak"
      8000
      "Friendly"
   )
)
+Name: Event name
+Repeat Count: 1
+Interval: 1
+Chained: 5
+Team: 0

#Goals ;! 0 total


#Waypoints ;! 0 lists total


#Messages ;! 0 total


#Reinforcements ;! 0 total


#Background bitmaps ;! 1 total

$Num stars: 500
$Ambient light level: 0

$Bitmap List:
$Sun: SunWhite
+Angles: 1.570795 0.000000 0.000000
+Scale: 1.000000
$Starbitmap: PlanetH
+Angles: 0.000000 0.000000 4.712385
+ScaleX: 8.000000
+ScaleY: 8.000000
+DivX: 1
+DivY: 1

#Asteroid Fields

#Music

$Event Music: None
$Briefing Music: None

#End
Title: Re: Thrusters and explosions
Post by: chief1983 on August 21, 2011, 11:46:57 pm
Threads like this are why I don't want my work to get me a new Macbook Pro since the entire line is ATI-powered now :(
Title: Re: Thrusters and explosions
Post by: Kolgena on August 22, 2011, 12:41:02 am
Hmm. I'm more than likely doing something wrong on my end, but I tried the latest build posted here and couldn't get distortions working for engine exhausts. framebuffer explosion distortions work fine though.

Did I need to do something with the shader files as well? Sorry to be a bother.
Title: Re: Thrusters and explosions
Post by: Valathil on August 22, 2011, 02:50:44 am
delete old soft-x.sdr files
Title: Re: Thrusters and explosions
Post by: Kolgena on August 22, 2011, 12:31:39 pm
I don't have any soft-x.sdr ._.


If it matters any, I'm on ATI (for epic lose)
Title: Re: Thrusters and explosions
Post by: Valathil on August 22, 2011, 01:05:02 pm
i meant as a wild card delete old soft-f.sdr and soft-v.sdr
Title: Re: Thrusters and explosions
Post by: Reprobator on August 22, 2011, 03:24:12 pm
hmm i had something strange with the last build :
Used the cloack effect and decloack (they didn't worked ) the only effect it had is that it push backward thruster out of its model normal position ^^
I'm using ati 6970 here.
Title: Re: Thrusters and explosions
Post by: Kolgena on August 23, 2011, 12:13:30 am
i meant as a wild card delete old soft-f.sdr and soft-v.sdr

I know. I have neither. Is that perhaps the problem?
Title: Re: Thrusters and explosions
Post by: Kolgena on September 03, 2011, 08:42:36 pm
Sorry for DP, but I figured that it was probably worth another post, rather than appending a bunch of new stuff to the last post.

Right now, I am using r7613, and am unable to get thruster distortions. Framebuffer distorted explosions work fine. Attached are the debug log and some screens. I'm using an ATI card, so if this is idiopathic, I'm fine with it never working as well.

For what it's worth, turning on the animated shader in the ship lab causes these weird black things to be drawn under the thrusters.

[attachment deleted by ninja]
Title: Re: Thrusters and explosions
Post by: Lester on September 04, 2011, 07:20:00 am
I'm getting the same thing on 7516, but I think it might be my aging HD2600 Pro to blame.
Title: Re: Thrusters and explosions
Post by: Nighteyes on September 04, 2011, 11:03:06 am
wait, are there also heat effects on shockwaves and explosions? because I haven't noticed any...
Title: Re: Thrusters and explosions
Post by: Commander Zane on September 04, 2011, 11:10:06 am
On shockwaves, yes. Do you have Enable Framebuffer Shockwaves checked on the Experimental list in the Launcher?
Title: Re: Thrusters and explosions
Post by: Kolgena on September 04, 2011, 07:00:22 pm
I'm getting the same thing on 7516, but I think it might be my aging HD2600 Pro to blame.

Probably. The 3650 is supposed to be a die shrink of the 2600, so the two cards are pretty much the same thing. 10.8 catalyst here, if it matters at all.
Title: Re: Thrusters and explosions
Post by: Valathil on September 04, 2011, 07:43:21 pm
wait till the nightly is up to revision 7629 i fixed something with opengl errors. maybe thats what was causing it
Title: Re: Thrusters and explosions
Post by: Kolgena on September 10, 2011, 08:46:18 pm
Nope, r7696 still doesn't have thruster distortions. Same problem as 7613.
Title: Re: Thrusters and explosions
Post by: Valathil on September 11, 2011, 02:42:13 am
i cant take care of every ****ty graphics card that is out there. of all the people that are using this 2 people are reporting not working thrusters. be glad that it just doesnt show them and not screw everything up. i am certainly glad cause then i would have to fix it. i dont know why its not working and without the specific card(s) in my pc that are having the problems i cant fix it. sry but thats just the way it is. if suddenly 10 people show up reporting problems on recent graphics cards ill take a look at it. but at the moment i just think is an old graphics card or driver issue
Title: Re: Thrusters and explosions
Post by: Kolgena on September 11, 2011, 09:11:42 pm
Yeah, that's fine. Just wanted to let you know that whatever changed up until 7696 doesn't fix it.
Title: Re: Thrusters and explosions
Post by: starwolf1991 on September 11, 2011, 10:10:31 pm
I haven't had any such issues with getting thruster distortion to work yet, and have been testings versions prior to 7696 as they are available.  I can also confirm that strange black stuff which appears around thrusters in ship lab, that is when animated shader is turned on. Nothing new aside from that.

I'll keep testing and see if anything I've missed shows up.
Title: Re: Thrusters and explosions
Post by: mjn.mixael on September 11, 2011, 10:30:07 pm
The black around the thrusters in the ship lab shouldn't ever happen anywhere else. It's caused by a combination of the animated shader (ship select materialization effect) and the thrusters being turned on. Since thrusters are never on in the actual ship select, this one probably isn't much of an issue.
Title: Re: Thrusters and explosions
Post by: Valathil on September 12, 2011, 01:59:27 pm
Indeed even though on my pc it works fine even with animated shader and thrusters enabled in the lab. Some ATI Context switching issue i presume. Again cant trace it without a card
Title: Re: Thrusters and explosions
Post by: mjn.mixael on September 12, 2011, 03:00:30 pm
Interesting... though I am on Nvidia... but I still wager that the issue can safely be ignored.
Title: Re: Thrusters and explosions
Post by: starwolf1991 on October 03, 2011, 03:33:02 am
Problem found in latest build, r7831: That black stuff which appears around thrusters in tech lab? It is occurring for explosions in-game as well. I was doing a trial battle in a custom mod (No unusual code or settings that shouldn't be there, nor custom effects) between a battleship and two cruisers. When one of the cruisers exploded, the black stuff appeared shortly before the shockwaves arrived.

Can someone run a test to verify this?
Title: Re: Thrusters and explosions
Post by: Dragon on October 04, 2011, 01:53:52 pm
I didn't noticed that, though I noticed another issue when thruster distortion is on:
(http://img812.imageshack.us/img812/6664/screen0087.th.png) (http://imageshack.us/photo/my-images/812/screen0087.png/)
This seems to come from distortion not being applied to glows, only to main haze. Whatever the case, I'd like to see it fixed.
Title: Re: Thrusters and explosions
Post by: mjn.mixael on October 04, 2011, 02:18:05 pm
F3 Lab does that and, iirc, we aren't worried about that. In-mission should be fine, please capture a screen from a mission if the issue remains.
Title: Re: Thrusters and explosions
Post by: starwolf1991 on October 05, 2011, 02:34:01 am
It's a strange one; I see it happen occasionally, but then its fine the rest of the time. Because of that, I don't think I can get you screenshots. :/
Title: Re: Thrusters and explosions
Post by: petar91 on October 18, 2011, 08:39:55 am
Hi,

About the distorsion effects i have some remarks :

_I think an option to enable/disable distorsion effect separatly for shockwave and thrusters would be usefull, the thruster distorsion limit is when you are behind a ship you can see the 2D flat/horizontal effect

_an option to disable the 3d blue shockwave effect and keep the shockwave distorsion would be usefull too.

Title: Re: Thrusters and explosions
Post by: Commander Zane on October 18, 2011, 08:51:36 am
You already can toggle the use of 2D - 3D shockwaves and shockwave distortion.
Title: Re: Thrusters and explosions
Post by: petar91 on October 18, 2011, 10:17:10 am
I know, but with it you have 2d or 3d shockwave with or without framebuffer shockwave. I was thinking of disabling the shockwave effect to keep only the distorsion effect (no 2d or 3d shockwave, but only the distorsion effect).
Title: Re: Thrusters and explosions
Post by: Zacam on October 18, 2011, 11:04:41 am

That would require tabling the effect to having a "blank" shockwave graphic. You can't disable the shockwaves and still  have shockwaves. Not possible. And the distortion is keyed to shockwaves.

So, make a transparent "no effect" shockwave. Viola.
Title: Re: Thrusters and explosions
Post by: Dragon on October 18, 2011, 11:38:30 am
Could we get the distortion applied to all thruster effects (also includes maneuvering thrusters), not just the haze?
I think it could look quite good.
Title: Re: Thrusters and explosions
Post by: Nighteyes on October 19, 2011, 05:14:03 pm
regarding the shockwaves:
"hey man, I was wondering if you could make the distortion effect on the shockwave tweakable via a table file like you did with the thruster, specifying an effect to use for the distortion, and an effect to render, the idea I have in mind is a 90% transparent shockwave, but with relatively strong distortion effect..."

to this the replay I got was that shockwaves distortions are experimental, and in due time will get a host of tweakable settings
Title: Re: Thrusters and explosions
Post by: starwolf1991 on November 06, 2011, 08:19:15 pm
Bug report: When testing latest 3.6.14 SSE and Non-SSE RC1, thruster distortion is not present even though they are enabled in launcher 5.5g. Also, the issue I reported regarding explosions and shockwaves is happening again. Unlike before, it is now appearing 100% of the time. Tested this in default FS2 and several mods, it appears in all of them.

Is this already a known issue or can anyone confirm it?
Title: Re: Thrusters and explosions
Post by: Kolgena on November 06, 2011, 08:38:18 pm
Did thrusters ever work for you with any of the nightlies? Some system setups (ATI) seem incapable of doing thruster distortion for some reason, and I doubt any changes were made when the code got moved to the RC.
Title: Re: Thrusters and explosions
Post by: starwolf1991 on November 06, 2011, 08:55:45 pm
Yes they have, as previously reported. And no, I am not running on ATI-based systems. The last nightlies build released before RC 3.6.14 was running thruster distortion perfectly and didn't have the aforementioned explosions/shockwaves issue.
Title: Re: Thrusters and explosions
Post by: niffiwan on November 06, 2011, 09:38:27 pm
Please note that 3.6.14 RC1 was originally based off trunk r7811 - can you confirm if this nightly (http://www.hard-light.net/forums/index.php?topic=78409.0) still has your issue? If it does then there could be a patch somewhere we need to backport to 3.6.14
Title: Re: Thrusters and explosions
Post by: starwolf1991 on November 06, 2011, 10:32:53 pm
I have never used that version, so I wouldn't know without testing.  I'll give r7811 a go and see if the reported issues occur. For clarity, r7939 was the last build I ever used and can say was most functional/stable.

I'm actually surprised RC1 is based off r7811. How come that far back? Only curious, no nitpicking intended.
Title: Re: Thrusters and explosions
Post by: niffiwan on November 06, 2011, 11:54:35 pm
In short, the 3.6.14 RC process was started around the time of r7811, then we hit a show-stopper issue which held things up a while.
Title: Re: Thrusters and explosions
Post by: chief1983 on November 07, 2011, 10:18:11 am
Yeah, I believe we did backport, or perhaps even sync with trunk for a while up to 7903.  But 7903 is the last revision in the 3.6.14 branch with any changes made that would affect Windows builds.
Title: Re: Thrusters and explosions
Post by: starwolf1991 on November 13, 2011, 07:58:39 pm
Sorry it took so long to get back. I have confirmed that the aforementioned issues are present in r7811. Done enough thorough testing in non-modded FS2 and in mods such as Blue Planet. Tested on multiple machines as well, with both rolled back and then up-to-date drivers; Appears on all.