Horde3D

Next-Generation Graphics Engine
It is currently 15.05.2024, 18:28

All times are UTC + 1 hour




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: 03.03.2009, 12:30 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks for the patches (and the very unrestrictive license for them). Volker and I are both abroad this week, so it will take some time until we can take a closer look.


Top
 Profile  
Reply with quote  
PostPosted: 03.03.2009, 21:14 
Offline

Joined: 03.06.2008, 18:57
Posts: 19
I have found bug in TextureResource::load. This function does not support non-square textures. There is patch:

egTexture.cpp Ln: 214
Old code (_width == _height):
Code:
// Store properties
_width = ddsHeader.dwWidth;
_height = ddsHeader.dwWidth;

New code:
Code:
// Store properties
_width = ddsHeader.dwWidth;
_height = ddsHeader.dwHeight;


Top
 Profile  
Reply with quote  
PostPosted: 03.03.2009, 23:23 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
I've noticed some pretty good performance ups. Other than little things here and there, everything looks pretty solid.


Top
 Profile  
Reply with quote  
PostPosted: 05.03.2009, 15:42 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
Code:
diff --git a/Horde3D/Source/Horde3DEngine/egPrimitives.cpp b/Horde3D/Source/Horde3DEngine/egPrimitives.cpp
index 37ab444..6b77219 100644
--- a/Horde3D/Source/Horde3DEngine/egPrimitives.cpp
+++ b/Horde3D/Source/Horde3DEngine/egPrimitives.cpp
@@ -105,10 +105,10 @@ void Frustum::buildViewFrustum( const Matrix4f &viewMat, const Matrix4f &projMat
        _corners[1] = mm * Vec3f(  1, -1,  1 );
        _corners[2] = mm * Vec3f(  1,  1,  1 );
        _corners[3] = mm * Vec3f( -1,  1,  1 );
-       _corners[4] = mm * Vec3f( -1, -1,  1 );
-       _corners[5] = mm * Vec3f(  1, -1,  1 );
-       _corners[6] = mm * Vec3f(  1,  1,  1 );
-       _corners[7] = mm * Vec3f( -1,  1,  1 );*/
+       _corners[4] = mm * Vec3f( -1, -1,  -1 );
+       _corners[5] = mm * Vec3f(  1, -1,  -1 );
+       _corners[6] = mm * Vec3f(  1,  1,  -1 );
+       _corners[7] = mm * Vec3f( -1,  1,  -1 );*/
 }


At least I think that's what you meant.

EDIT: Well, no, doesn't work that way either? o.O

EDIT2: This does what I expected that code to do (copied from pickRay()):
Code:
   Matrix4f mm = m.inverted();
   Vec4f corner = mm * Vec4f( -1, -1,  1, 1 );
   corner.x /= corner.w; corner.y /= corner.w; corner.z /= corner.w;
   _corners[0] = Vec3f( corner.x, corner.y, corner.z );
   corner = mm * Vec4f( 1, -1,  1, 1 );
   corner.x /= corner.w; corner.y /= corner.w; corner.z /= corner.w;
   _corners[1] = Vec3f( corner.x, corner.y, corner.z );
   corner = mm * Vec4f( 1,  1,  1, 1 );
   corner.x /= corner.w; corner.y /= corner.w; corner.z /= corner.w;
   _corners[2] = Vec3f( corner.x, corner.y, corner.z );
   corner = mm * Vec4f( -1,  1,  1, 1 );
   corner.x /= corner.w; corner.y /= corner.w; corner.z /= corner.w;
   _corners[3] = Vec3f( corner.x, corner.y, corner.z );
   corner = mm * Vec4f( -1, -1, -1, 1 );
   corner.x /= corner.w; corner.y /= corner.w; corner.z /= corner.w;
   _corners[4] = Vec3f( corner.x, corner.y, corner.z );
   corner = mm * Vec4f( 1, -1, -1, 1 );
   corner.x /= corner.w; corner.y /= corner.w; corner.z /= corner.w;
   _corners[5] = Vec3f( corner.x, corner.y, corner.z );
   corner = mm * Vec4f( 1, 1, -1, 1 );
   corner.x /= corner.w; corner.y /= corner.w; corner.z /= corner.w;
   _corners[6] = Vec3f( corner.x, corner.y, corner.z );
   corner = mm * Vec4f( -1, 1, -1, 1 );
   corner.x /= corner.w; corner.y /= corner.w; corner.z /= corner.w;
   _corners[7] = Vec3f( corner.x, corner.y, corner.z );


Did I get the use of this corner data wrong? Now it just outputs the corners of the frustum in world coordinates.


Top
 Profile  
Reply with quote  
PostPosted: 15.03.2009, 23:02 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
@phoenix: Your assumption is right. Thanks for the patch.

Thanks to everyone for the feedback. We fixed the problems reported here. Volker will soon upload Beta3 to SourceForge.


Top
 Profile  
Reply with quote  
PostPosted: 17.03.2009, 00:57 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
i've finally updated to beta3(the zipped sdk). but in my case i've encountered a performance(fps) drop in the samples compared to the svn version i was using. on my laptop from 24 to 20 and desktop from 301 to 250 regarding the chicago sample. the knight behaves similarly.

this is weird...

_________________
Paul


Top
 Profile  
Reply with quote  
PostPosted: 18.03.2009, 01:16 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Hmm, I see two possible reasons:

- There was a very sample scene specific optimization in Beta2 (objects with parallax shader were not casting shadows) which is no more existing in Beta3

- The LOD in Beta3 improves GPU performance but costs additional CPU cycles. If you are CPU limited instead of GPU limited, the framerate could be lower (e.g. if your graphics card is much better than your processor)


Top
 Profile  
Reply with quote  
PostPosted: 18.03.2009, 10:01 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
the computers i've used to test, one is cpu limited (sort of): Intel e8400 @ 3GHz / 2 x Nvidia8800GT OC on SLI

and the other one gpu limited: Intel t3200 @ 2GHz / Nvidia8200M G

The performance decrease seems constant on both of them.

I would like to test the optimisation solution. Was the shadow optimisation done in the pipeline or the shader? Why was it removed? Is it not compatible with B3?

Has anyone else experienced a performance drop when upgrading?

_________________
Paul


Top
 Profile  
Reply with quote  
PostPosted: 30.03.2009, 00:25 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
SpOOky wrote:
I would like to test the optimisation solution. Was the shadow optimisation done in the pipeline or the shader? Why was it removed? Is it not compatible with B3?

The optimization was a real hack specific to the samples. The parallax-mapped materials did not have a shadow context since we knew that there was no object in the sample scenes that could receive their shadows. The new übershader based system is more generic, so that hack would need to be implemented as a special case which I think is not worth doing.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 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