Horde3D
http://horde3d.org/forums/

glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect
http://horde3d.org/forums/viewtopic.php?f=1&t=518
Page 1 of 2

Author:  yarik [ 02.10.2008, 18:57 ]
Post subject:  glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

I've tried to modify Knight sample whith minor changes in setupWindow() func to enable FSAA, but it doesn't work.

Code:
bool setupWindow( int width, int height, bool fullscreen )
{
   glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4);

   // Create OpenGL window
   if( !glfwOpenWindow( width, height, 8, 8, 8, 8, 24, 8, GLFW_FULLSCREEN ) )
   {
      glfwTerminate();
      return false;
   }

   if( !fullscreen ) glfwSetWindowTitle( caption );
   
   // Disable vertical synchronization
   glfwSwapInterval( 0 );

   // Set listeners
   glfwSetWindowCloseCallback( windowCloseListener );
   glfwSetKeyCallback( keyPressListener );
   glfwSetMousePosCallback( mouseMoveListener );
   
   return true;
}

Why :?: :?

Author:  swiftcoder [ 02.10.2008, 19:43 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

Have you also enabled multi-sampling?
Code:
 glEnable(GL_MULTISAMPLE);

Author:  Illidane [ 02.10.2008, 20:05 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

swiftcoder wrote:
Have you also enabled multi-sampling?
Code:
 glEnable(GL_MULTISAMPLE);



year, but nothing... :(

Author:  swiftcoder [ 02.10.2008, 21:01 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

Illidane wrote:
swiftcoder wrote:
Have you also enabled multi-sampling?
Code:
 glEnable(GL_MULTISAMPLE);

year, but nothing... :(
Hmm... probably something to do with the HDR then. Can you try doing the same thing to the Chicago or Terrain sample? Neither of those use the HDR pipeline, and I remember there being problems with FSAA and floating point render buffers in the past.

Author:  Illidane [ 02.10.2008, 21:20 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

I have the same thing with the Chicago demo... don't know, maybe it's dont work so nice as I want, but I exactly see the step on men. Are there better antialiasing methods available for Horde3D?

Author:  swiftcoder [ 02.10.2008, 22:37 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

Illidane wrote:
I have the same thing with the Chicago demo... don't know, maybe it's dont work so nice as I want, but I exactly see the step on men. Are there better antialiasing methods available for Horde3D?
Another question: how are you confirming that it is not working correctly?

Try calling glfwGetWindowParam(GLFW_FSAA_SAMPLES) after creating your window, to make sure that the window actually supports FSAA (some drivers may not support FSAA in all configurations).

Author:  yarik [ 03.10.2008, 07:19 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

swiftcoder wrote:
Have you also enabled multi-sampling?
Code:
 glEnable(GL_MULTISAMPLE);

Ok, it works now in Chicago sample.
glDisable( GL_MULTISAMPLE ); in Renderer::initStates() was at the bottom of problem. Thanks! :)

Author:  Illidane [ 03.10.2008, 12:17 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

Cool! Thx

Author:  marciano [ 03.10.2008, 13:33 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

See also Wiki HOWTO.

Author:  Siavash [ 01.12.2009, 03:47 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

Excuse me for bumping an old thread. May I ask you why GL_MULTISAMPLE is disabled by default in Renderer::initStates() ? Because that disables the multisampling in other libs too [glfw/sfml] and SampleCount in H3DOptions.

I've tried to enable the multisampling by changing the glDisable(GL_MULTISAMPLE) to glEnable(GL_MULTISAMPLE) in Renderer::initStates() like yarik. Is it the right way to enable the multisampling?

Author:  swiftcoder [ 01.12.2009, 03:54 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

Multisampling should be enabled on a per-rendertarget basis, as long as you set the maxSamples to something other than 0 on that render target.

Author:  Siavash [ 01.12.2009, 16:24 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

As always thanks a lot dear swiftcoder :wink:

Author:  Irdis [ 27.02.2010, 13:56 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

Umm, sorry for stupid question, but how to set MSAA in forward pipeline?
If I try to add a buffer I get: Pipeline resource 'pipelines/forward.pipeline.xml': Unknown RenderTarget format

Code:
<Pipeline>
   <Setup>
      <RenderTarget id="buffer" depthBuf="true" numColBufs="1" format="RGBA8F" scale="1.0" maxSamples="16" />
   </Setup>
   <CommandQueue>
      <Stage id="Geometry" link="pipelines/globalSettings.material.xml">

         <SwitchTarget target="buffer" />
         <ClearTarget depthBuf="true" colBuf0="true" />
         
         <DrawGeometry context="AMBIENT" class="~Translucent" />
         
         <DoForwardLightLoop class="~Translucent" />
         
         <DrawGeometry context="TRANSLUCENT" class="Translucent" />
      </Stage>
      
      <Stage id="Overlays">
         <DrawOverlays context="OVERLAY" />
      </Stage>
   </CommandQueue>
</Pipeline>

Author:  marciano [ 28.02.2010, 18:26 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

RGBA8F is not existing (would be a 8 bit floating point format). You can use RGBA8 or RGBA16F instead. However, please note that MSAA with FP buffers is often not supported on older hardware.

Author:  Irdis [ 01.03.2010, 10:08 ]
Post subject:  Re: glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - no effect

I changed RGBA8F to RGBA8 (and to RGBA16F), but I still get nothing with this pipeline. No errors in the log...

Page 1 of 2 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/