Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Digitalfragment

Programmable Pipeline

This topic is 5215 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

Okay, i understand the role Vertex and Fragment Programs in the rendering pipleline, but the fragment program occurs before the blending of the incomming fragment and the existing fragment right? Asides the glBlendFunc method, is there any other way of controlling this? AFAIK there is no Blend Program, but is there something along those lines? Or am i just going to have to make do with glBlendFunc()? Also, how are cubemaps dealt with in ARB vertex and fragment shaders? Is there a different enumerant for use in the TXP command? (Instead of 1D / 2D / 3D?)

Share this post


Link to post
Share on other sites
Advertisement
TXP command for cube maps is CUBE instead of 2D, 3d...
as far as blending goes, Im not sure. I think you can pretty closely do most the stuff you would want to with glBlendFunc. But I can''t say for sure, not taht experenced with shaders yet

"I seek knowledge and to help those who also seek it"

Share this post


Link to post
Share on other sites
The blending can be done in the fragment shader. The blending stage does not occur after, but during the fragment stage.

I think at least (GLSlang).

Share this post


Link to post
Share on other sites
Actually, that''s not accurate. Blending definitely occurs after the fragment shader, and there''s currently no way to do blending in the fragment shader since you can''t read from the frame buffer at that point.

With all of the options offered by glBlendFunc, glBlendFuncSeparate, glBlendEquation, and glBlendEquationSeparate, you should be able to do pretty much anything you want to do, though.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!