View Full Version : Ocean shine - how to implement without extensions?

02-17-2006, 04:13 PM

Wondering if someone can guide me a bit here. I would like some nice specular highlights on my oceans but not the land. I have these bitmaps:

1. RGB Texture of Earth (land and ocean)
2. B&W RGB map of oceans (oceans white, land black) - could convert to alpha.

Any way to get the desired effect without using an extension? Hopefully just 2 renders. Maybe something like this I think:

1. Render planet without spec
2. Render map with cunning blending and spec lighting...?

Thanks for any help -


02-25-2006, 11:48 PM
Hmmm, what happened to this forum? Where did everyone go?

02-26-2006, 12:22 AM
Do you want code or what?

I mean do a lighting pass with specular modulated by your texture and add it to the diffuse pass with a one, one blendfunc.

You basically describe your algorithm in your question.

Maybe you should have posted in the beginners forum.

02-26-2006, 12:37 AM
The OpenGL Shading Language book (aka the orange book) has a chapter on rendering the earth and using a specular map to control which areas are lit with specular highlights.

02-26-2006, 01:36 PM
Well thanks. Got it working, Sometimes you just need confirmation that you're on the right path so that you know to persevere when it ain't working. You gotta squeak to get the grease, even if your tyre gets kicked :-)

02-26-2006, 09:51 PM
Yes, but there are far more people squeakin' than there are people greasin'.

Besides, you learn more by answering questions than you do by asking them. But then again, maybe I've been listening to too much Pat Boone lately.