Fake Edge Shader

Blitz3D Forums/Blitz3D Programming/Fake Edge Shader

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I was trying to think of a way to do a edge shader like you see in many PC demos.
Its basically an effect that makes models look like they are been viewed with an electron microscope. Well, that's how I would describe it anyway.

After messing around for ages with variations on toon shading from the archive, I had a go with negative light...

And it worked.



Bigger version here!

Graphics3D(800,600,0,2)
SetBuffer(BackBuffer())

bug=LoadMesh("bug.b3d")

cam=CreateCamera()
lig=CreateLight(1,cam)

MoveEntity(cam,0,0,-150)
CameraZoom(cam,2)

;The bit that does the effect
LightColor(lig,-255,-255,-255)
AmbientLight(128,255,64)

Repeat
	TurnEntity(bug,0,0.5,0)

	UpdateWorld()
	RenderWorld()

	Flip()

Until KeyDown(1)
End

Could it be any simpler...
(Not earth-shattering I admit but a nice effect.)