Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Graphics3D 800, 600, 0, 2
- image = LoadTexture("tosw.png")
- image2 = LoadTexture("tosw2.png")
- SetBuffer( TextureBuffer( image2 ) )
- LockBuffer()
- For x = 0 To 255
- For y = 0 To 255
- rgb = ReadPixelFast( x, y )
- r = (rgb And $FF0000)/$10000
- g = (rgb And $FF00)/$100
- b = rgb And $FF
- asdf = ( r + g + b ) / 3
- rgb2 = 256*$1000000 + asdf*$10000 + asdf*$100 + asdf
- WritePixelFast( x, y, rgb2 )
- Next
- Next
- UnlockBuffer()
- timer = CreateTimer( 60 )
- SetBuffer BackBuffer()
- alpha# = 1.0
- camera = CreateCamera()
- PositionEntity camera, 0, 0, -4
- cube1 = CreateCube()
- EntityTexture cube1, image
- cube2 = CreateCube()
- EntityTexture cube2, image2
- Repeat
- If alpha > 0 Then alpha = alpha - 0.005
- EntityAlpha cube1, alpha
- RenderWorld
- UpdateWorld
- WaitTimer timer
- Flip 0
- Cls
- Until KeyHit( 1 )
- End
Add Comment
Please, Sign In to add comment