[Change] Modified plasma fractals a little.
This commit is contained in:
parent
dc1134d6d7
commit
839f4e71e5
@ -63,7 +63,7 @@ void menu_main(void) {
|
||||
unsigned int bwid, wid;
|
||||
glTexture* tex;
|
||||
|
||||
tex = pf_genFractal(gl_screen.w, gl_screen.h, 10.);
|
||||
tex = pf_genFractal(gl_screen.w, gl_screen.h, 5.);
|
||||
|
||||
// Create background image window.
|
||||
bwid = window_create("BG", -1, -1, gl_screen.w, gl_screen.h);
|
||||
|
@ -18,6 +18,7 @@ glTexture* pf_genFractal(const int w, const int h, double rug) {
|
||||
SDL_Surface* sur;
|
||||
uint32_t* pix;
|
||||
glTexture* tex;
|
||||
double c;
|
||||
|
||||
map = pf_genFractalMap(w, h, rug);
|
||||
|
||||
@ -27,9 +28,8 @@ glTexture* pf_genFractal(const int w, const int h, double rug) {
|
||||
// Convert from mapping to actual colours.
|
||||
SDL_LockSurface(sur);
|
||||
for(i = 0; i < h*w; i++) {
|
||||
pix[i] = RMASK + BMASK + GMASK + (AMASK & (uint32_t)(AMASK*5000*map[i]));
|
||||
//DEBUG("amask [%d]: %f [%u]", i, 1000*map[i],
|
||||
//(AMASK & (uint32_t)(AMASK*1000*map[i])));
|
||||
c = map[i];
|
||||
pix[i] = RMASK + BMASK + GMASK + (AMASK & (uint32_t)(AMASK*c));
|
||||
}
|
||||
SDL_UnlockSurface(sur);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user