Subversion Repositories ps3ware

Compare Revisions

Ignore whitespace Rev 208 → Rev 209

/trunk/libps3rsx/examples/simple_fx/ps3gpu.cpp
58,7 → 58,7
float h = 0.3f;
frustrum( -w, +w, -h, +h, 1.0f, 100.0f, matrix );
translatef( 0.0f, 0.0f, -4.0f, matrix );
translatef( 0.0f, 0.0f, -5.0f, matrix );
rotatef( angle, 0.0f, 1.0f, 0.0f, matrix );
rotatef( 90.0f, 1.0f, 0.0f, 0.0f, matrix );
489,10 → 489,10
 
};
 
#define INUMBER 32
#define INUMBER 20
instance_data_t insts[INUMBER] __attribute__((aligned( 128 ) ));
uint32_t dt[INUMBER];
float rnds[INUMBER][3];
float rnds[INUMBER][4];
 
 
float rnd( float beg, float end )
513,9 → 513,11
{
dt[i] = ( rand() & 63 ) + 32;
rnds[i][0] = 360.0f * i / (float)( INUMBER );//rnd( 0.0f, 360.0f );
rnds[i][1] = rnd( -0.5f, +0.5f );
rnds[i][2] = rnd( -0.5f, +0.5f );
rnds[i][1] = rnd( -0.2f, +0.2f );
rnds[i][2] = rnd( -0.8f, +0.3f );
rnds[i][3] = rnd( 0.7f, 1.7f );
insts[i].time = rand();
insts[i].col[0] = rnd( 0.8f, 1.0f );
insts[i].col[1] = rnd( 0.8f, 1.0f );
532,11 → 534,11
rotatef( 80.0f, 1.0f, 0.0f, 0.0f, insts[i].mat );
rotatef( off * 0.5f + rnds[i][0], 0.0f, 0.0f, 1.0f, insts[i].mat );
translatef( 1.6f, rnds[i][1], rnds[i][2], insts[i].mat );
translatef( rnds[i][3], rnds[i][1], rnds[i][2], insts[i].mat );
float d = insts[i].mat[11];
d = ( 1.0f - 0.6f * d );
d = ( 1.0f - d );
insts[i].col[0] = d;
insts[i].col[1] = 0.5f + d;
insts[i].col[2] = d;