lit sphere
Here's another post. It's a lit sphere. It uses a pointlight with invsqr decay (or at least I think so... 🙂 ) and phong shading. I'm thinking of the background, so please don't complain of that! I'm also going to make the sphere move over the screen but that will be the next release 🙂
Looks awesome 👍, just add some cool coloring effects, a good background, and make it more music sensitive, and you've got yourself a good-looking preset. 🙂
Well this time it's a changing ellipsoid. A little bit more responsive and quite a little bit slower... But I like it! Still thinking of the bg
Uhh not to sound like and ass but this isn't phong shading. Phong shading is where you calculate the averaged normals where polygon vertices touch and then interpolate them across the polygon and recalculate the light for each pixel. Assuming I followed your code right, this is just using normal vectors to calculate the light. You should try rotating the camera around and shifting it, but you're well onto your way. Try new shapes and stuff. That's always fun. Oh and learning how to approximate using the Whittaker or Newton methods to do more complicated shapes like quartics etc.
Well, probably you're right. I've read sometime somewhere that using normals for calculating light is called phong shading. I'm afraid I don't remember where 🙁