Programmable Pipeline

Started by
4 comments, last by Digitalfragment 19 years, 10 months ago
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?)
Advertisement
??? little help guys ???
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"
"I seek knowledge and to help those who also seek it"
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).
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.
Thanks for correcting me. You learn a new thing everyday

This topic is closed to new replies.

Advertisement