Jump to content

[SOLVED] Clouds invert scattering skip & background color bug


photo

Recommended Posts

Hello,

 

My project uses a white background (when not using scattering). To be able to see wireframe I toggle the background to black (as wireframe lines are white). Now in doing this and disabling some render passes, it inverts the color of the clouds in my sky. Here is the offending code (with lines of interest left uncommented)

 

void SetWireframe(int enabled)
{
//engine.console.run(format("render_show_triangles %i", enabled));
//engine.console.run(format("render_skip_opacity_ambient %i", enabled));
//engine.console.run(format("render_skip_opacity_light %i", enabled));
//engine.console.run(format("render_skip_transparent_ambient %i", enabled));
//engine.console.run(format("render_skip_transparent_light %i", enabled));
engine.console.run(format("render_skip_scattering %i", enabled));
//engine.console.run(format("render_skip_occlusion %i", enabled));
//engine.console.run(format("render_skip_reflection %i", enabled));
//engine.console.run(format("render_skip_refraction %i", enabled));
//engine.console.run(format("render_skip_deferred %i", enabled));
engine.render.setBackgroundColor(enabled ? vec4(0,0,0,1) : vec4(1,1,1,1));
}

 

Once the clouds are inverted, I found the only way to get them to return to normal is to disable the clouds and re-enable them. Then they are magically fixed. So I can workaround, but just letting you know of the existance of this issue.

Link to comment

Never mind, this bug doesn't exist! I was already calling engine.render.setBackgroundColor(enabled ? vec4(0,0,0,1) : vec4(1,1,1,1)); elsewhere and this was conflicting with the custom wireframe mode. Please ignore this thread >_<

Link to comment
×
×
  • Create New...