Replaced uint with unsigned int
This commit is contained in:
parent
1c6d46d07c
commit
e4e89101b6
@ -442,23 +442,23 @@ void SoftShadowMap::initJittering(osg::StateSet *ss)
|
||||
texture3D->setWrap(osg::Texture3D::WRAP_R,osg::Texture3D::REPEAT);
|
||||
texture3D->setUseHardwareMipMapGeneration(true);
|
||||
|
||||
const uint size = 16;
|
||||
const uint gridW = 8;
|
||||
const uint gridH = 8;
|
||||
uint R = (gridW * gridH / 2);
|
||||
const unsigned int size = 16;
|
||||
const unsigned int gridW = 8;
|
||||
const unsigned int gridH = 8;
|
||||
unsigned int R = (gridW * gridH / 2);
|
||||
texture3D->setTextureSize(size, size, R);
|
||||
|
||||
// then create the 3d image to fill with jittering data
|
||||
osg::Image* image3D = new osg::Image;
|
||||
unsigned char *data3D = new unsigned char[size * size * R * 4];
|
||||
|
||||
for ( uint s = 0; s < size; ++s )
|
||||
for ( unsigned int s = 0; s < size; ++s )
|
||||
{
|
||||
for ( uint t = 0; t < size; ++t )
|
||||
for ( unsigned int t = 0; t < size; ++t )
|
||||
{
|
||||
float v[4], d[4];
|
||||
|
||||
for ( uint r = 0; r < R; ++r )
|
||||
for ( unsigned int r = 0; r < R; ++r )
|
||||
{
|
||||
const int x = r % ( gridW / 2 );
|
||||
const int y = ( gridH - 1 ) - ( r / (gridW / 2) );
|
||||
@ -485,7 +485,7 @@ void SoftShadowMap::initJittering(osg::StateSet *ss)
|
||||
d[3] = sqrtf( v[3] ) * sinf( 2.f * 3.1415926f * v[2] );
|
||||
|
||||
// store d into unsigned values [0,255]
|
||||
const uint tmp = ( (r * size * size) + (t * size) + s ) * 4;
|
||||
const unsigned int tmp = ( (r * size * size) + (t * size) + s ) * 4;
|
||||
data3D[ tmp + 0 ] = (unsigned char)( ( 1.f + d[0] ) * 127 );
|
||||
data3D[ tmp + 1 ] = (unsigned char)( ( 1.f + d[1] ) * 127 );
|
||||
data3D[ tmp + 2 ] = (unsigned char)( ( 1.f + d[2] ) * 127 );
|
||||
|
Loading…
Reference in New Issue
Block a user