is presently its sole maintainer,
You can support him:
Off we go with a bit of a recap
Talk about MakeSphereNormalMap and GPU vs CPU renderer
Make TreeNormal for MakeSphereNormalMap to use
Get the game running, look at the unpacking of the NormalMap and change the way that it's packed
Blackboard: Consider the hacky nature of the problem
Blackboard: The Ground's normals
Handle front-facing bitmaps for now, starting by introducing UnscaleAndBiasNormal
Check it out in-game and look back through the code
Draw just the Normal and force Texel.a to be 1.0f
Step through the NormalMap code
Moment of realisation: We were still sampling out of the Texture
Continue stepping through the code
Moment of realisation: Usually you want to move to the next Pixel when you write one
Quickly check the maths
Blackboard: Nz should be Pythagorean theorem solved
Set the Normal and look at how the Pixels are packed
Step through the code
Blackboard: Dealing with the area outside the sphere
Check the values of the Normal
Take a look at it in-game and find some erroneously negative values
Owl of Shame Moment: Yesterday's code was awful
View the correct NormalMap
Recalculate Texel.rgb such that it is within the valid range of colours
Turn off the NormalMap and consider using something more defined than the tree bitmap
Temporarily draw TreeNormal as if it was a texture map
Set the Pitch correctly and introduce BilinearSample function
Check it out in-game and switch to the path in which the NormalMap modulates the texture
Light the texture with the NormalMap
Take a look at it in-game
Tackle the environment_map stuff
Blackboard: Picking from the environment map
Nullify the Middle sample and make SampleEnvironmentMap produce values we can use
Look forward to next week
Recap today's cleaning up
pseudonym73 Q: When you lerp two normals, you probably won't get a normalised vector. There are a few things you can do about that. Would you briefly comment on your thoughts about this?
@chronaldragon Q: how are we going to sample lights when calculating the pixel values for each sprite? Will there be a list of all the lights? Or will that be a parameter of some sort?
ingenero Q: What ever happened to your almond milk?
insofaras Q: Will Yangtian be making normal maps for the art now too?
andsz_ Q: Will you cover more advanced BRDFs? Or just simple phong-like lighting equations?
panic00 Q: What if I don't want my game to be just 'normal'? Are there any other kinds of maps I can use to make my game more unique?
@chronaldragon Q: Some games use a 'bump-map' in addition or instead of a normal map. What is the difference between these and what are the advantages or disadvantages?
Blackboard: Bump Map vs Normal Map
gasto5 Q; Will the effect end up like a bump map effect?
deadvertex Q: Could we do reflections by using our frame buffer as an environment map when drawing the bitmap?
pseudonym73 Q: If you imagine the surface as an implicit function f(x,y,z) = 0, it's the gradient of THAT function. Which is the same as the cross product of the two surface tangents.
We have come to the end of the questions