[Aqsis-commits] SF.net SVN: aqsis: [1942] trunk/aqsis/renderer/render
Brought to you by:
ltatkinson,
pgregory
From: <c4...@us...> - 2008-02-24 01:55:14
|
Revision: 1942 http://aqsis.svn.sourceforge.net/aqsis/?rev=1942&view=rev Author: c42f Date: 2008-02-23 17:55:19 -0800 (Sat, 23 Feb 2008) Log Message: ----------- * Really (fingers crossed) fix the bug referred to in svn revision 1934. The previous "fix" resulted in a crash according to a comment on IRC by Michel Joron. Imager shaders should now run on all the vertices of a grid, rather than leaving the bottom right of the grid uninitialized. Revision Links: -------------- http://aqsis.svn.sourceforge.net/aqsis/?rev=1934&view=rev Modified Paths: -------------- trunk/aqsis/renderer/render/imagers.cpp trunk/aqsis/renderer/render/imagers.h Modified: trunk/aqsis/renderer/render/imagers.cpp =================================================================== --- trunk/aqsis/renderer/render/imagers.cpp 2008-02-24 00:56:25 UTC (rev 1941) +++ trunk/aqsis/renderer/render/imagers.cpp 2008-02-24 01:55:19 UTC (rev 1942) @@ -61,23 +61,17 @@ } //--------------------------------------------------------------------- -/** Initialise the environment for the specified grid size - * and execute the shader on the complete grid. - * \param uGridRes Integer grid resolution == 1. - * \param vGridRes Integer grid resolution == 1. - * \param x Integer Raster position. - * \param y Integer Raster position. - * \param color Initial value Ci. - * \param opacity Initial value Oi. - * \param depth Initial value depth (not required). - * \param coverage Initial value "alpha" - */ void CqImagersource::Initialise( IqBucket* pBucket ) { TIME_SCOPE("Imager shading") - TqInt uGridRes = pBucket->Width(); - TqInt vGridRes = pBucket->Height(); + // We use one less than the bucket width and height here, since these + // resolutions really represent one less than the number of shaded points + // in each direction. (Usually they describe the number of micropolygons + // on a grid which is one less than the number of shaded vertices. This + // concept has no real analogue in context of an imager shader.) + TqInt uGridRes = pBucket->Width()-1; + TqInt vGridRes = pBucket->Height()-1; TqInt x = pBucket->XOrigin(); TqInt y = pBucket->YOrigin(); Modified: trunk/aqsis/renderer/render/imagers.h =================================================================== --- trunk/aqsis/renderer/render/imagers.h 2008-02-24 00:56:25 UTC (rev 1941) +++ trunk/aqsis/renderer/render/imagers.h 2008-02-24 01:55:19 UTC (rev 1942) @@ -70,7 +70,12 @@ return ( m_pShader ); } - void Initialise( IqBucket* pBucket ); + /** \brief Initialise and execute the imager shader over the provided bucket. + * + * \param pBucket - Bucket from which to take the source shader data for the + * imager shader. + */ + void Initialise(IqBucket* pBucket); // Forwarding functions for IqShaderExecEnv This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |