Hemispheric Lighting Shader for OpenB3D (GLSL)
Tweet glsl lighting shaders code-archives openb3d
Hemisphere lighting is a simple way of emulating indirect light contributions found in a typical outdoor scene.
For OpenB3D (GLSL only) and by way of porting it from other implementations, demos or engines.
another advanced example from other engines..
This isn't that complicated, what do you think of this port of a Unity tutorial?
Press T to blend with texture, the lighting vector is just rotated around the y axis. I'm not sure exactly what I'm doing but it seems to be working.
That looks interesting Mark, but I don't see any much difference. Can you please post an extreme color screenshot for the upper and lower hemisphere and with some textures? or perhaps replicate the effect with the stanford bunny on image 1.
My old Win7 main drive of almost a decade finally gave up on me a few weeks ago and so I don't have any blitzmax installation at the moment, still re-organizing..
OK, I've updated the example to use a positionable point light, the screenies have the light from directly below so an up vector ie. 0,1,0 where green is the lower hemisphere color and blue is the upper, diffuse color is white.
One thing that might be wrong is when the light points on the xz plane then the upper color (blue) is closer to the light.
Great work Mark!
It seems this shader effect has come a long way and much simpler now with that Unity ported version..
Here is another screenshot from another engine in its full glory using real outdoor lighting colors with Normal + Spec Mapping with left image without it.
Closing this now and will be transferring to code archive..
Reply To Topic (minimum 10 characters)
Please log in to reply