Horde3D

Next-Generation Graphics Engine
It is currently 20.10.2019, 23:05

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: bug in calcCropMatrix?
PostPosted: 19.03.2011, 15:35 
Offline

Joined: 11.09.2010, 20:21
Posts: 44
Location: Germany
I just read over calcCropMatrix and although I have not completely thought about its working, I find the following lines a bit irregular:

Code:
float minX = clamp( maxf( frustMinX, bbMinX ), -1, 1 );
float minY = clamp( maxf( frustMinY, bbMinY ), -1, 1 );
float minZ = clamp( minf( frustMinZ, bbMinZ ), -1, 1 );   <--- !!!
float maxX = clamp( minf( frustMaxX, bbMaxX ), -1, 1 );
float maxY = clamp( minf( frustMaxY, bbMaxY ), -1, 1 );
float maxZ = clamp( minf( frustMaxZ, bbMaxZ ), -1, 1 );


If this is right, forgive my stupid post, but it seems a bit irregular, that you use min for the z coordinate and max for the others.


Top
 Profile  
Reply with quote  
PostPosted: 19.03.2011, 21:10 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
I agree that it looks irregular but it is really intended in that case to improve the depth precision (please see also this article for more details). A comment in the code would certainly be useful...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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