Horde3D

Next-Generation Graphics Engine
It is currently 28.03.2024, 09:29

All times are UTC + 1 hour




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 02.10.2008, 18:57 
Offline

Joined: 09.09.2008, 12:44
Posts: 6
Location: Ukraine, Kiev
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 :?: :?


Top
 Profile  
Reply with quote  
PostPosted: 02.10.2008, 19:43 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Have you also enabled multi-sampling?
Code:
 glEnable(GL_MULTISAMPLE);

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 02.10.2008, 20:05 
Offline

Joined: 02.10.2008, 20:04
Posts: 3
swiftcoder wrote:
Have you also enabled multi-sampling?
Code:
 glEnable(GL_MULTISAMPLE);



year, but nothing... :(


Top
 Profile  
Reply with quote  
PostPosted: 02.10.2008, 21:01 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 02.10.2008, 21:20 
Offline

Joined: 02.10.2008, 20:04
Posts: 3
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?


Top
 Profile  
Reply with quote  
PostPosted: 02.10.2008, 22:37 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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).

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 03.10.2008, 07:19 
Offline

Joined: 09.09.2008, 12:44
Posts: 6
Location: Ukraine, Kiev
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! :)


Top
 Profile  
Reply with quote  
PostPosted: 03.10.2008, 12:17 
Offline

Joined: 02.10.2008, 20:04
Posts: 3
Cool! Thx


Top
 Profile  
Reply with quote  
PostPosted: 03.10.2008, 13:33 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
See also Wiki HOWTO.


Top
 Profile  
Reply with quote  
PostPosted: 01.12.2009, 03:47 
Offline

Joined: 21.08.2008, 11:44
Posts: 354
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?


Top
 Profile  
Reply with quote  
PostPosted: 01.12.2009, 03:54 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 01.12.2009, 16:24 
Offline

Joined: 21.08.2008, 11:44
Posts: 354
As always thanks a lot dear swiftcoder :wink:


Top
 Profile  
Reply with quote  
PostPosted: 27.02.2010, 13:56 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
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>


Top
 Profile  
Reply with quote  
PostPosted: 28.02.2010, 18:26 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
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.


Top
 Profile  
Reply with quote  
PostPosted: 01.03.2010, 10:08 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
I changed RGBA8F to RGBA8 (and to RGBA16F), but I still get nothing with this pipeline. No errors in the log...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group