View Full Version : Apply a texture with some constant alpha value
02-13-2004, 02:50 PM
I'd like to allpy a texture to my object with variable opacity - for example, have a texture on an object that's only faintly visible, or an environment map that looks like shiny plastic (the material I set) instead of chrome. How could I do that?
02-13-2004, 03:21 PM
The only way I know of to do that is to use glEnable(GL_BLEND), set your blending functions, and draw the translucent object. Lighting and materials should still apply, so long as you don't disable them.
02-13-2004, 03:30 PM
So I can't do it in one pass then?
What I want is to have just a slight bit of my texture showing on my solid red sphere, not to have my sphere be see-through.
02-13-2004, 05:10 PM
It's definately doable in one pass. For sure you can do it with a fragment program, but you should be able to do it using multitexturing, and perhaps even with the right texture function. I forget which that might be.
02-13-2004, 05:20 PM
Ah, that's the problem, I don't know what it might be either.
I wish fragment programs were easy in OpenGL...
02-13-2004, 06:46 PM
I think this may be what you want http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_env_combine.txt
use INTERPOLATE and you should be able to get the effect you want unless I misunderstand
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.