Bug - Use of compositors disables AA in Linux

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
areay
Bugbear
Posts: 819
Joined: Wed May 05, 2010 4:59 am
Location: Auckland, NZ
x 69

Bug - Use of compositors disables AA in Linux

Post by areay »

Hi guys,

Can a fellow Linux user confirm if the use of compositors disables anti-aliasing?

The easiest way to test is to fire up the SampleBrowser and choose the 'Compositors' sample being sure to enable AA in the config when it prompts you. When it loads, get close up to the house and toggle a compositor (the black & white example make it easy to see) and confirm if they get AA switched off for them. I've tested in windows using OpenGL and DirectX and it works fine there. It doesn't seem to matter which compositor I use, I always get the same results. I've attached a screenshot to show what's up; On the left is no compositors set, on the right I've enabled the B&W compositor and highlighted the aliasing effect
aa-example.jpg
aa-example.jpg (47.97 KiB) Viewed 3234 times
I'm using Ogre 1.8.1 & Intel integrated HD4000 GPU and would like to hear what you're running and whether or not this also affects you. If it's affecting others then I'll raise a bug ticket.

Cheers
dbtx
Halfling
Posts: 66
Joined: Tue Nov 01, 2011 9:07 pm
x 10

Re: Bug - Use of compositors disables AA in Linux

Post by dbtx »

Yes, same thing in SampleBrowser and in a thing I was playing with. I'm using a Radeon HD 3200 with all open drivers and the v1-8 branch, pulled and built a month ago. I had RTT Preferred Mode set to FBO; it works with either PBuffer or Copy.
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Bug - Use of compositors disables AA in Linux

Post by scrawl »

Yeah, this pretty much has been happening since ever (Nvidia here).
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: Bug - Use of compositors disables AA in Linux

Post by lingfors »

Isn't this pretty standard, i.e. whenever you render to texture you don't get hardware AA?
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Bug - Use of compositors disables AA in Linux

Post by scrawl »

Yes, but there's an extension for MSAA on FBO's. http://oss.sgi.com/projects/ogl-sample/ ... sample.txt
And I'm pretty sure my 560 Ti nvidia card should be supporting it :) (Edit: Yes, extension shows up in ogre log)
dbtx
Halfling
Posts: 66
Joined: Tue Nov 01, 2011 9:07 pm
x 10

Re: Bug - Use of compositors disables AA in Linux

Post by dbtx »

I temporarily replaced all uses of 'fsaa' with '8' in RenderSystems/GL/src/OgreGLFBORenderTexture.cpp and it antialiased again. Is this because it was supposed to be only a hint and I probably forced it to break something else?
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Bug - Use of compositors disables AA in Linux

Post by scrawl »

I had a closer look at this.
In CompositorInstance::deriveTextureRenderTargetOptions, fsaa value is derived from RenderWindow:

Code: Select all

	if (renderingScene)
	{
		// Ok, inherit settings from target
		RenderTarget* target = mChain->getViewport()->getTarget();
		*hwGammaWrite = target->isHardwareGammaEnabled();
		*fsaa = target->getFSAA();
		*fsaaHint = target->getFSAAHint();
	}
The RenderTarget will be a RenderWindow, and on linux, it is a GLXWindow. However, GLXWindow::mFSAA is never set to the actual value used, so it is left at 0.
Last edited by scrawl on Sat Aug 24, 2013 11:29 am, edited 1 time in total.
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Bug - Use of compositors disables AA in Linux

Post by scrawl »

Untested patch against 1.9 (might apply against 1.8 too) - can anyone check if this works? The laptop I am using now does not support fsaa, so I cant check.

Code: Select all

--- a/RenderSystems/GL/src/GLX/OgreGLXWindow.cpp	Fri Aug 23 01:43:15 2013 -0500
+++ b/RenderSystems/GL/src/GLX/OgreGLXWindow.cpp	Sat Aug 24 12:27:30 2013 +0200
@@ -294,6 +294,11 @@
 
 			fbConfig = mGLSupport->selectFBConfig(minAttribs, maxAttribs);
 
+			// Now check the actual supported fsaa value
+			GLint maxSamples;
+			mGLSupport->getFBConfigAttrib(fbConfig, GLX_SAMPLES, &maxSamples);
+			mFSAA = maxSamples;
+
 			if (gamma != 0)
 			{
 				mGLSupport->getFBConfigAttrib(fbConfig, GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, &gamma);
User avatar
areay
Bugbear
Posts: 819
Joined: Wed May 05, 2010 4:59 am
Location: Auckland, NZ
x 69

Re: Bug - Use of compositors disables AA in Linux

Post by areay »

scrawl wrote:Untested patch against 1.9 (might apply against 1.8 too) - can anyone check if this works? The laptop I am using now does not support fsaa, so I cant check.
Confirmed! Works perfect for me using 1.8.1. Great work Scrawl, thanks a lot!
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Bug - Use of compositors disables AA in Linux

Post by scrawl »

Great! Pull request sent.
User avatar
pezzzz
Gnoblar
Posts: 16
Joined: Fri Aug 28, 2009 11:40 am

Re: Bug - Use of compositors disables AA in Linux

Post by pezzzz »

Confirmed. Patch works with 1.8.1 with Linux.
Alessandro Pezzato
Image
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Bug - Use of compositors disables AA in Linux

Post by scrawl »

It's included in the 1.9 release ;)
User avatar
areay
Bugbear
Posts: 819
Joined: Wed May 05, 2010 4:59 am
Location: Auckland, NZ
x 69

Re: Bug - Use of compositors disables AA in Linux

Post by areay »

Once again, thanks Scrawl.
User avatar
fractile
Gremlin
Posts: 199
Joined: Thu Jan 13, 2005 2:35 pm
Location: Tampere, Finland
x 15
Contact:

Re: Bug - Use of compositors disables AA in Linux

Post by fractile »

I'm using Ogre 1.9 in Linux with Intel HD4600 and enabling compositor still disables anti-aliasing for me.. what am I missing here?

Here are capabilities detected by Ogre:

Code: Select all

I 2014-02-24 21:33:53.890 CPU Identifier & Features
I 2014-02-24 21:33:53.890 -------------------------
I 2014-02-24 21:33:53.890  *   CPU ID: GenuineIntel: Intel(R) Core(TM) i5-4570T CPU @ 2.90GHz
I 2014-02-24 21:33:53.890  *      SSE: yes
I 2014-02-24 21:33:53.890  *     SSE2: yes
I 2014-02-24 21:33:53.890  *     SSE3: yes
I 2014-02-24 21:33:53.890  *      MMX: yes
I 2014-02-24 21:33:53.890  *   MMXEXT: yes
I 2014-02-24 21:33:53.890  *    3DNOW: no
I 2014-02-24 21:33:53.890  * 3DNOWEXT: no
I 2014-02-24 21:33:53.890  *     CMOV: yes
I 2014-02-24 21:33:53.890  *      TSC: yes
I 2014-02-24 21:33:53.890  *      FPU: yes
I 2014-02-24 21:33:53.890  *      PRO: yes
I 2014-02-24 21:33:53.890  *       HT: no
I 2014-02-24 21:33:53.890 -------------------------
I 2014-02-24 21:33:53.890 ******************************
*** Starting GLX Subsystem ***
******************************
I 2014-02-24 21:33:53.890 Registering ResourceManager for type Texture
I 2014-02-24 21:33:53.891 GLRenderSystem::_createRenderWindow "Lockdown Protocol", 1920x1200 fullscreen  miscParams: FSAA=8 displayFrequency=60 Hz gamma=No vsync=No 
I 2014-02-24 21:33:53.921 GLXWindow::create used FBConfigID = 118
I 2014-02-24 21:33:53.921 GL_VERSION = 3.0 Mesa 9.2.1
I 2014-02-24 21:33:53.921 GL_VENDOR = Intel Open Source Technology Center
I 2014-02-24 21:33:53.921 GL_RENDERER = Mesa DRI Intel(R) Haswell Desktop 
I 2014-02-24 21:33:53.921 GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_3DFX_texture_compression_FXT1 GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_envmap_bumpmap GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_depth_clamp GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_APPLE_object_purgeable GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_array GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_separate_shader_objects GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_texture_lod GL_ARB_texture_cube_map_array GL_ARB_texture_multisample GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_shader_bit_encoding GL_ARB_timer_query GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_internalformat_query GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_texture_storage GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_transform_feedback GL_ARB_ES3_compatibility GL_ARB_invalidate_subdata GL_ARB_texture_storage_multisample 
I 2014-02-24 21:33:53.921 Supported GLX extensions: GLX_ARB_create_context GLX_ARB_create_context_profile GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_create_context_es2_profile GLX_MESA_copy_sub_buffer GLX_MESA_multithread_makecurrent GLX_MESA_swap_control GLX_OML_swap_method GLX_OML_sync_control GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGIX_visual_select_group GLX_EXT_texture_from_pixmap GLX_INTEL_swap_event 
I 2014-02-24 21:33:53.921 ***************************
I 2014-02-24 21:33:53.921 *** GL Renderer Started ***
I 2014-02-24 21:33:53.921 ***************************
I 2014-02-24 21:33:53.924 Registering ResourceManager for type GpuProgram
I 2014-02-24 21:33:53.924 GLSL support detected
I 2014-02-24 21:33:53.924 GL: Using GL_EXT_framebuffer_object for rendering to textures (best)
I 2014-02-24 21:33:53.925 FBO PF_UNKNOWN depth/stencil support: D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.925 FBO PF_A8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.926 FBO PF_R5G6B5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.926 FBO PF_B5G6R5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.926 FBO PF_A4R4G4B4 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.927 FBO PF_A1R5G5B5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.928 FBO PF_R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.928 FBO PF_B8G8R8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.928 FBO PF_A8R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.928 FBO PF_B8G8R8A8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.929 FBO PF_A2R10G10B10 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.929 FBO PF_A2B10G10R10 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.929 FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.929 FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.930 FBO PF_X8R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.930 FBO PF_X8B8G8R8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.930 FBO PF_SHORT_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.930 FBO PF_R3G3B2 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.930 FBO PF_FLOAT16_R depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.931 FBO PF_FLOAT32_R depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D16S1 D16S4 D16S8 D16S16 D24S0 D24S1 D24S4 D24S8 D24S16 D32S0 D32S1 D32S4 D32S8 D32S16 Packed-D24S8 
I 2014-02-24 21:33:53.931 [GL] : Valid FBO targets PF_UNKNOWN PF_A8 PF_R5G6B5 PF_B5G6R5 PF_A4R4G4B4 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_B8G8R8A8 PF_A2R10G10B10 PF_A2B10G10R10 PF_FLOAT16_RGBA PF_FLOAT32_RGBA PF_X8R8G8B8 PF_X8B8G8R8 PF_SHORT_RGBA PF_R3G3B2 PF_FLOAT16_R PF_FLOAT32_R 
I 2014-02-24 21:33:53.931 RenderSystem capabilities
I 2014-02-24 21:33:53.931 -------------------------
I 2014-02-24 21:33:53.931 RenderSystem Name: OpenGL Rendering Subsystem
I 2014-02-24 21:33:53.931 GPU Vendor: intel
I 2014-02-24 21:33:53.931 Device Name: Mesa DRI Intel(R) Haswell Desktop 
I 2014-02-24 21:33:53.931 Driver Version: 3.0.0.0
I 2014-02-24 21:33:53.931  * Fixed function pipeline: yes
I 2014-02-24 21:33:53.931  * Hardware generation of mipmaps: no
I 2014-02-24 21:33:53.931  * Texture blending: yes
I 2014-02-24 21:33:53.931  * Anisotropic texture filtering: yes
I 2014-02-24 21:33:53.931  * Dot product texture operation: yes
I 2014-02-24 21:33:53.931  * Cube mapping: yes
I 2014-02-24 21:33:53.931  * Hardware stencil buffer: yes
I 2014-02-24 21:33:53.931    - Stencil depth: 8
I 2014-02-24 21:33:53.931    - Two sided stencil support: yes
I 2014-02-24 21:33:53.931    - Wrap stencil values: yes
I 2014-02-24 21:33:53.931  * Hardware vertex / index buffers: yes
I 2014-02-24 21:33:53.931  * 32-bit index buffers: yes
I 2014-02-24 21:33:53.931  * Vertex programs: yes
I 2014-02-24 21:33:53.931  * Number of floating-point constants for vertex programs: 4096
I 2014-02-24 21:33:53.931  * Number of integer constants for vertex programs: 0
I 2014-02-24 21:33:53.931  * Number of boolean constants for vertex programs: 0
I 2014-02-24 21:33:53.931  * Fragment programs: yes
I 2014-02-24 21:33:53.931  * Number of floating-point constants for fragment programs: 4096
I 2014-02-24 21:33:53.931  * Number of integer constants for fragment programs: 0
I 2014-02-24 21:33:53.931  * Number of boolean constants for fragment programs: 0
I 2014-02-24 21:33:53.931  * Geometry programs: no
I 2014-02-24 21:33:53.931  * Number of floating-point constants for geometry programs: 0
I 2014-02-24 21:33:53.931  * Number of integer constants for geometry programs: 0
I 2014-02-24 21:33:53.931  * Number of boolean constants for geometry programs: 0
I 2014-02-24 21:33:53.931  * Tesselation Hull programs: no
I 2014-02-24 21:33:53.931  * Number of floating-point constants for tesselation hull programs: 0
I 2014-02-24 21:33:53.931  * Number of integer constants for tesselation hull programs: 0
I 2014-02-24 21:33:53.931  * Number of boolean constants for tesselation hull programs: 0
I 2014-02-24 21:33:53.931  * Tesselation Domain programs: no
I 2014-02-24 21:33:53.931  * Number of floating-point constants for tesselation domain programs: 0
I 2014-02-24 21:33:53.931  * Number of integer constants for tesselation domain programs: 0
I 2014-02-24 21:33:53.931  * Number of boolean constants for tesselation domain programs: 0
I 2014-02-24 21:33:53.931  * Compute programs: no
I 2014-02-24 21:33:53.931  * Number of floating-point constants for compute programs: 0
I 2014-02-24 21:33:53.931  * Number of integer constants for compute programs: 0
I 2014-02-24 21:33:53.931  * Number of boolean constants for compute programs: 0
I 2014-02-24 21:33:53.931  * Supported Shader Profiles: arbfp1 arbvp1 glsl
I 2014-02-24 21:33:53.931  * Texture Compression: yes
I 2014-02-24 21:33:53.931    - DXT: yes
I 2014-02-24 21:33:53.931    - VTC: no
I 2014-02-24 21:33:53.931    - PVRTC: no
I 2014-02-24 21:33:53.931    - ATC: no
I 2014-02-24 21:33:53.931    - ETC1: no
I 2014-02-24 21:33:53.931    - ETC2: no
I 2014-02-24 21:33:53.931    - BC4/BC5: no
I 2014-02-24 21:33:53.931    - BC6H/BC7: no
I 2014-02-24 21:33:53.931  * Scissor Rectangle: yes
I 2014-02-24 21:33:53.931  * Hardware Occlusion Query: yes
I 2014-02-24 21:33:53.931  * User clip planes: yes
I 2014-02-24 21:33:53.931  * VET_UBYTE4 vertex element type: yes
I 2014-02-24 21:33:53.931  * Infinite far plane projection: yes
I 2014-02-24 21:33:53.931  * Hardware render-to-texture: yes
I 2014-02-24 21:33:53.931  * Floating point textures: yes
I 2014-02-24 21:33:53.931  * Non-power-of-two textures: yes
I 2014-02-24 21:33:53.931  * 1d textures: yes
I 2014-02-24 21:33:53.931  * Volume textures: yes
I 2014-02-24 21:33:53.931  * Multiple Render Targets: 8
I 2014-02-24 21:33:53.931    - With different bit depths: yes
I 2014-02-24 21:33:53.931  * Point Sprites: yes
I 2014-02-24 21:33:53.931  * Extended point parameters: yes
I 2014-02-24 21:33:53.931  * Max Point Size: 255
I 2014-02-24 21:33:53.931  * Vertex texture fetch: yes
I 2014-02-24 21:33:53.931  * Number of world matrices: 0
I 2014-02-24 21:33:53.931  * Number of texture units: 16
I 2014-02-24 21:33:53.931  * Stencil buffer depth: 8
I 2014-02-24 21:33:53.931  * Number of vertex blend matrices: 0
I 2014-02-24 21:33:53.931    - Max vertex textures: 16
I 2014-02-24 21:33:53.931    - Vertex textures shared: yes
I 2014-02-24 21:33:53.931  * Render to Vertex Buffer : no
I 2014-02-24 21:33:53.931  * Hardware Atomic Counters: no
I 2014-02-24 21:33:53.931  * GL 1.5 without VBO workaround: no
I 2014-02-24 21:33:53.931  * Frame Buffer objects: yes
I 2014-02-24 21:33:53.931  * Frame Buffer objects (ARB extension): no
I 2014-02-24 21:33:53.931  * Frame Buffer objects (ATI extension): no
I 2014-02-24 21:33:53.931  * PBuffer support: yes
I 2014-02-24 21:33:53.931  * GL 1.5 without HW-occlusion workaround: no
I 2014-02-24 21:33:53.931  * Vertex Array Objects: no
I 2014-02-24 21:33:53.931  * Separate shader objects: no
I 2014-02-24 21:33:53.932 Using FSAA from GL_ARB_multisample extension.
I 2014-02-24 21:33:53.932 DefaultWorkQueue('Root') initialising on thread main.
User avatar
fractile
Gremlin
Posts: 199
Joined: Thu Jan 13, 2005 2:35 pm
Location: Tampere, Finland
x 15
Contact:

Re: Bug - Use of compositors disables AA in Linux

Post by fractile »

Sorry to bump this, but..

Based on this thread I understood that I should be able to get anti-aliasing with compositors using Ogre 1.9 automatically. Am I right or is there something I should do to enable this?
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Bug - Use of compositors disables AA in Linux

Post by scrawl »

What kind of compositor is it? Does the problem persist in Ogre's sample browser? What AA options do you get in the config screen?
User avatar
fractile
Gremlin
Posts: 199
Joined: Thu Jan 13, 2005 2:35 pm
Location: Tampere, Finland
x 15
Contact:

Re: Bug - Use of compositors disables AA in Linux

Post by fractile »

Here's the script of the only active compositor:

Code: Select all

compositor glow
{
	technique
	{
		texture rt0 target_width target_height PF_A8R8G8B8
		texture temp0 target_width_scaled 0.5 target_height_scaled 0.5 PF_A8R8G8B8
		texture temp1 target_width_scaled 0.5 target_height_scaled 0.5 PF_A8R8G8B8

		// Fetch scene contents
		target rt0
		{
			input previous
		}

		// Get scene rendered with 'glow' scheme
		target temp0
		{
			input none
			material_scheme glow

			pass clear
			{
			}

			pass render_scene
			{
			}
		}

		// Blur horizontally
		target temp1
		{
			input none

			pass clear
			{
			}

			pass render_quad
			{
				material compositor_blur_h
				input 0 temp0
			}
		}

		// Blur vertically
		target temp0
		{
			input none
			pass render_quad
			{
				material compositor_blur_v
				input 0 temp1
			}
		}

        // Add result to original
		target_output
		{
			input none
			pass render_quad
			{
				material compositor_add
				input 0 rt0
				input 1 temp0
			}
		}
	}
}
The config dialog shows an option named FSAA with values from 0 to 8. I haven't tried the samples yet, because I didn't build them. I will try that later.
User avatar
fractile
Gremlin
Posts: 199
Joined: Thu Jan 13, 2005 2:35 pm
Location: Tampere, Finland
x 15
Contact:

Re: Bug - Use of compositors disables AA in Linux

Post by fractile »

It turned out that AA does work if I render to a separate texture and reference that in next compositor, but not when using "target_output" in first compositor and "input previous" in the next.

I got anti-aliasing working with compositors like this (old version in comments):

Code: Select all

compositor base
{
    technique
    {
        texture fb target_width target_height PF_R8G8B8A8 chain_scope

        //target_output
        target fb
        {
            input none

            pass clear
            {
                colour_value 0.075 0.110 0.153 1.0
            }

            pass render_scene
            {
                first_render_queue 0
                last_render_queue 60
            }
        }
    }
}

compositor glow
{
	technique
	{
		//texture rt0 target_width target_height PF_R8G8B8A8
		texture temp0 target_width_scaled 0.5 target_height_scaled 0.5 PF_R8G8B8A8
		texture temp1 target_width_scaled 0.5 target_height_scaled 0.5 PF_R8G8B8A8

		// Fetch scene contents
		//target rt0
		//{
			//input previous
		//}

        texture_ref rt0 base fb

		// Get scene rendered with 'glow' scheme
		target temp0
		{
			input none
			material_scheme glow

			pass clear
			{
			}

			pass render_scene
			{
			}
		}

		// Blur horizontally
		target temp1
		{
			input none

			pass clear
			{
			}

			pass render_quad
			{
				material compositor_blur_h
				input 0 temp0
			}
		}

		// Blur vertically
		target temp0
		{
			input none
			pass render_quad
			{
				material compositor_blur_v
				input 0 temp1
			}
		}

        // Add result to original
		target_output
		{
			input none
			pass render_quad
			{
				material compositor_add
				input 0 rt0
				input 1 temp0
			}
		}
	}
}
I can live with this limitation, but can someone explain why this happens?
Post Reply