Reason I’m posting in the Game Engine thread: Even though it’s texture related, I’m intending to implement this feature into my “Game” engine, based on what’s in Blender.
CALLING ALL OPENGL / GLSL GURUS (Coders)
I’m trying to get my head around how the “reflection” texture works in Blender, and how to calculate the same results in GLSL/OGL.
SO I first looked up “Sphere Mapping”, because “Reflection Mapping” seems to refer to Cube Maps. Blender can use 1 Sphere texture without taking any light source into consideration, and display that sphere map smoothly along a surface - somehow based on nothing but camera position (I think?). That’s what I want to do, in GLSL.
http://www.ozone3d.net/tutorials/glsl_texturing_p04.php (mid page, Specular Highlights with Sphere Map)
Artifacts on side: https://www.youtube.com/watch?v=hx66_xWhVu4
Correct on the side but now artifact has moved to top: https://www.youtube.com/watch?v=MncCOyGuaOs
I’m doing everything in the vertex shader:
Please, if anyone could help by looking into the calculations? You might be able to catch what I’m not seeing as it really isn’t even a big calculation…
Thank you in advance guys