November 28, 2020, 11:28:46 AM

Author Topic: [bb] quick planet glow without entityorder by Rob [ 1+ years ago ]  (Read 594 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : quick planet glow without entityorder
Author : Rob
Posted : 1+ years ago

Description : planet gradient fx

Code :
Code: BlitzBasic
  1. ;bugs: rob@redflame.net
  2. Graphics3D 640,480,16,2
  3. camera=CreateCamera()
  4. planet=CreateSphere()
  5. glow=CreateSprite()
  6. ScaleSprite glow,2,2
  7.  
  8. light=CreateLight(2)
  9. MoveEntity light,1000,1000,-1000
  10. MoveEntity camera,0,0,-10
  11.  
  12. tex=CreateTexture(64,64,48+2+512)
  13. SetBuffer TextureBuffer(tex)
  14. For i=1 To 64
  15.         Color i*3,i*3,i*4
  16.         Oval i/2,i/2,64-i,64-i,1
  17. Next
  18. EntityTexture glow,tex
  19. EntityBlend glow,3
  20.  
  21. While Not KeyHit(1)
  22.  
  23.         PositionEntity glow,EntityX(planet),EntityY(planet),EntityZ(planet)
  24.         PointEntity glow,camera
  25.         MoveEntity glow,0,0,-1
  26.  
  27.  
  28.         UpdateWorld
  29.         RenderWorld
  30.         Flip
  31. Wend
  32. End


Comments :


Clyde(Posted 1+ years ago)

 Simple, yet cool :)


puki(Posted 1+ years ago)

 Hmm, not sure what this is supposed to do?  I ran it and saw a white ball, not too dissimilar to a white cue ball. So I removed the 'glow' effect and saw the same white cue ball.Have I missed something here?  By removing all of the code lines that contain the world 'glow', I see the same result.Hope I didn't break it.


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal