here a outher version
example:
#constant freq = 64
#constant tab = 32
sync on : sync rate 0 : backdrop off : autocam off
dim cosi(511)
dim color(255)
w1 as byte
w2 as byte
w3 as byte
for i = 1 to 3
make object sphere i, 128, 32, 32
set object light i, 0
read x, y, z
position object i, x, y, z
next i
set camera to image 0, 10, 512, 512
sprite 10, 0, 0, 10
set sprite alpha 10, 10
set sprite 10, 0, 1
size sprite 10, screen width(), screen height()
make object plain 10, 1024, 1024
pitch object up 10, 90
set reflection shading on 10
get image 11, 0, 0, 256, 256
make memblock from image 1, 11
make object sphere 11, 1024, 32, 32
set object cull 11, 0
set object light 11, 0
texture object 11, 11
for i = 0 to 511
cosi(i) = cos((360 * i) / 256) * freq + tab
next i
for i = 0 to 85 : color(i) = rgb(255 - i * 3, i * 3, 0) : next i
for i = 86 to 170 : color(i) = rgb(0, 255 - i * 3, i * 3) : next i
for i = 171 to 255 : color(i) = rgb(i * 3, 0, 255 - i * 3) : next i
repeat
gosub _plasma
set camera to follow 0, 0, 0, a#, 400, 128 + sin(a#) * 64, 1, 0
point camera 0, 0, 0
a# = a# + 0.7
set cursor 0, 0
print screen fps()
inc o : if o > 3 then o = 1
SyncCams(o)
until mouseclick()
end
data -150, 64, 0
data 0, 64, -150
data 150, 64, 0
_plasma:
inc w1, 2
inc w2, 2
inc w3, 3
for y = 0 to 255
d = cosi(y + w2) + cosi(y + w3)
for x = 0 to 255
c = (cosi(x + w1) + cosi(x + y) + d) and 255
write memblock dword 1, 12 + (x + y * 256) * 4, color(c)
next x
next y
make image from memblock 11, 1
return
function SyncCams(o)
restore camdata
for c = 1 to 6
make camera c
read x, y, z
rotate camera c, x, y, z
position camera c, object position x(o), object position y(o), object position z(o)
set camera aspect c, 1.0
set camera fov c, 90
set camera to image c, c, 256, 256
next c
sync
for c = 1 to 6 : delete camera c : next c
set cube mapping on o, 1, 2, 3, 4, 5, 6
camdata:
data 0, 90, 0
data 0, 270, 0
data 270, 0, 0
data 90, 0, 0
data 0, 0, 0
data 0, 180, 0
endfunction
pure blur:
set camera to image 0, 10, 512, 512
sprite 10, 0, 0, 10
set sprite alpha 10, 10
set sprite 10, 0, 1
size sprite 10, screen width(), screen height()
change image and the alpha value to your wishes and put it to
your own code