Code archives/3D Graphics - Effects/Heat shader Fake
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Download with media: [url]http://www.blitz-pasting.net/index.php?content=bp_showupload&id=443[/url] | |||||
Graphics3D 640,480,32,2 SetBuffer BackBuffer() cam=CreateCamera() MoveEntity cam,0,0,-3 Zombie=LoadMesh("zombie.b3d") EntityFX zombie, 1+2 ;EntityColor zombie,255,255,255 tex=CreateTexture(1,1) For x#= 0 To TextureWidth(tex)-1 For y#=0 To TextureHeight(tex)-1 WritePixel x,y,$FFFFFFFF,TextureBuffer(tex) Next Next EntityTexture zombie,tex FitMesh zombie,-2,-2,-2,4,4,4,1 EntityPickMode zombie,2 Repeat t2=t1 t1=MilliSecs() TurnEntity zombie,0,5,0 sc=CountSurfaces(zombie) For i = 1 To sc surf=GetSurface(zombie,i) vc=CountVertices(surf) For g =0 To vc-1 x#=VertexX#(surf,g) y#=VertexY#(surf,g) z#=VertexX#(surf,g) LinePick x#,y#,z#,-x#,-y#,-z# dis#=0 If PickedEntity() dis#=z#-PickedZ#() EndIf ende=0 If Abs(dis) < 0.1 Vcolor = $00FF0000 If Abs(dis) > 0.1 Vcolor = $0000FF00 If Abs(dis) > 0.4 Vcolor = $000000FF VertexColor Surf, g,(VColor And $00FF0000) Shr 16 , (VColor And $0000FF00) Shr 8, VColor And $000000FF ,255 Next Next ;UpdateWorld RenderWorld Text 0,0,(1000.0/(t1-t2)) Flip 0 Until KeyHit(1) End |
Comments
| ||
Link to download with media does not work. |
| ||
uhhh... [url]? how about you do [a httpyourwebsite]here[\a] (use a forward slash) |
| ||
why are people always 'faking' something? cant they do anything real? sry, no offence |
| ||
Go ON Devil, Show us how to not "fake it" in b3D..? I mean, There is no "fake" really. its just another way to do it :) in this term, "Shader" is fake, because obviously Blitz3D cannot do shaders. So, if you manage to pull this off, you're "faking" it too :P |
Code Archives Forum