[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;
|
unsigned int bwid, wid;
|
||||||
glTexture* tex;
|
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.
|
// Create background image window.
|
||||||
bwid = window_create("BG", -1, -1, gl_screen.w, gl_screen.h);
|
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;
|
SDL_Surface* sur;
|
||||||
uint32_t* pix;
|
uint32_t* pix;
|
||||||
glTexture* tex;
|
glTexture* tex;
|
||||||
|
double c;
|
||||||
|
|
||||||
map = pf_genFractalMap(w, h, rug);
|
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.
|
// Convert from mapping to actual colours.
|
||||||
SDL_LockSurface(sur);
|
SDL_LockSurface(sur);
|
||||||
for(i = 0; i < h*w; i++) {
|
for(i = 0; i < h*w; i++) {
|
||||||
pix[i] = RMASK + BMASK + GMASK + (AMASK & (uint32_t)(AMASK*5000*map[i]));
|
c = map[i];
|
||||||
//DEBUG("amask [%d]: %f [%u]", i, 1000*map[i],
|
pix[i] = RMASK + BMASK + GMASK + (AMASK & (uint32_t)(AMASK*c));
|
||||||
//(AMASK & (uint32_t)(AMASK*1000*map[i])));
|
|
||||||
}
|
}
|
||||||
SDL_UnlockSurface(sur);
|
SDL_UnlockSurface(sur);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user