Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Multitexturing and lightmaps-- help me with an implementation?

This topic is 2828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I'm looking for a way to implement a multi-texturing pipeline without shaders to do an effect. Does anyone know if this is possible, and if it is possible, could give me some code or pseudocode? DirectX or OpenGL, both welcome. The effect I want could be done with a shader, but for other reasons, I must, at the moment, stick with OpenGLES1-- no shaders.

Okay, I have a lightmap.

I have a character I want to light based on one pixel in the lightmap. These are all 2D sprites.

So, if I were doing this with pure source code, it would go something like:

Color aCharacterColor=mLightmap.GetColor(x,y);

So here's the question: Is there some way to do this with multipass texturing?
Could I set up one pass to be the sprite of the character, with the character's UV coordinates... and then another pass with all the uv set to one pixel in the lightmap, the (x,y)... and get the character's color to be multiplied by that pixel?

I'm no expert at the rendering pipeline (after only a couple hours of doing shaders, I am better at shaders than I ever was with the fixed pipeline), but like I said, I need to keep using GLES1 for the time being.

Thanks in advance for your help. Code appreciated!


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!