From: <Rly...@us...> - 2012-05-01 15:07:42
|
Revision: 38006 http://crystal.svn.sourceforge.net/crystal/?rev=38006&view=rev Author: RlyDontKnow Date: 2012-05-01 15:07:36 +0000 (Tue, 01 May 2012) Log Message: ----------- fix scaling if target is bigger than gbuffer Modified Paths: -------------- CS/trunk/plugins/rendermanager/deferred/deferred.cpp Modified: CS/trunk/plugins/rendermanager/deferred/deferred.cpp =================================================================== --- CS/trunk/plugins/rendermanager/deferred/deferred.cpp 2012-05-01 11:43:54 UTC (rev 38005) +++ CS/trunk/plugins/rendermanager/deferred/deferred.cpp 2012-05-01 15:07:36 UTC (rev 38006) @@ -203,8 +203,8 @@ if(width != targetW || height != targetH) { // calculate perspective fixup for gbuffer pass. - float scaleX = float(targetW)/float (width); - float scaleY = float(targetH)/float (height); + float scaleX = csMin(float(targetW)/float (width),1.0f); + float scaleY = csMin(float(targetH)/float (height),1.0f); m = CS::Math::Matrix4 ( scaleX, 0, 0, scaleX-1.0f, 0, scaleY, 0, scaleY-1.0f, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |