Hi everyone,
I'm trying to implement a spherical reflection feature on a nds 3d render engine i'm working on, as a final project, but I'm having trouble to get the effect right. I based my code on the libnds example (Env_mapping) but it's not working, so i wish someone could explain me the process, to see what i'm doing wrong. I searched info about this topic but i found nothing.
What i do is to set a texture with TEXGEN_NORMAL parameter to generate the texture coordinates in that way and when i apply it, in texture matrix mode, i do a scaling operation, just like in the example, to set the range from normals [-1, 1] to texture coordinates range. I do not understand the 16 bits shift its done in the example in order to scale. Does this value depend on the texture dimensions?
The result is not good, as the mesh doesn't seem to be centered on the texture.
Finally, is it necessary to send the TexCoord command? The gbatek specs says something about that but i don't really understand it.
Thanks in advance.
Environment mapping troubles
Re: Environment mapping troubles
No one knows?? Please it's very important! It would be great if i could fix this!! 

Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests