programming blend function

导读:
  Antonio Bleile
   programming blend function
  Hi,
  I'm currently trying to blend two RGBE (HDRI encoded) fragments
  together.
  The only way this seems to work is through shaders (the shader takes
  as
  input a copy of the RGBE encoded framebuffer, the shader then blends
  the fragments togehter). There is no way to "customize/program" the
  glBlendFunc,
  right? What about OpenGL 3? Will that allow it? And there's absolutely
  no way
  for the fragment shader to access the framebuffer, right? What about
  FBO's?
  Those are ordinary textures, what happens if I just give a fragment
  shader the
  current FBO render target as input (sounds insane, but it might be
  legal?).
  Thank you &Regards,
  Toni
  
  09-16-2007, 03:33 PM
  Wolfgang Draxinger
   Re: programming blend function
  Antonio Bleile wrote:
  >Hi,
  >
  >I'm currently trying to blend two RGBE (HDRI encoded)
  >fragments together.
  >The only way this seems to work is through shaders (the shader
  >takes as input a copy of the RGBE encoded framebuffer, the
  >shader then blends the fragments togehter).
  >There is no way to "customize/program" the glBlendFunc, right?
  glBlendFunc controls a part of the fixed function pipeline.
  Anything different from the fixed function pipeline must be done
  with shaders.
  >What about OpenGL 3? Will that allow it?
  OpenGL 3 will discard the fixed function pipeline completely,
  i.e. you must define all vertex and framgment processing
  yourself. This will also mean, that a lot of API functions will
  be removed, among them glBlendFunc.
  >And there's absolutely no way for the fragment shader to access
  >the framebuffer, right?
  No, since the framebuffer is in constant change while a primitive
  is processed. So there must be a copy taken somewhere in the
  process.
  >What about FBO's? Those are ordinary textures,
  No they aren't. A FBO can be used as texture, but can do also
  other stuff.
  >what happens if I just give a fragment shader the current FBO
  >render target as input (sounds insane, but it might be legal?).
  Read the FBO spec, it contains an own paragraph exactly about
  this. You can't bind a FBO that's a render target as texture
  within the same render context. And you can't make a texture
  bound FBO as render target.
  Wolfgang Draxinger
  --
  E-Mail address works, Jabber: hexarith--at--jabber.org, ICQ: 134682867
  
  09-16-2007, 10:16 PM
  fungus
   Re: programming blend function
  On Sep 16, 4:42 pm, Antonio Bleile wrote:
  >There is no way to "customize/program" the
  >glBlendFunc, right?
  Right.
  >What about OpenGL 3? Will that allow it?
  No. At the hardware level there's a big gap
  between the pixel shading operations and
  the blending operations. Bringing them
  together would kill performance.
  --
  
  / O O /
  /_____/ FTB. Remove my socks for email address.
  
  09-17-2007, 02:58 AM
  Antonio Bleile
   Re: programming blend function
  On Sep 17, 5:16 am, fungus wrote:
  >On Sep 16, 4:42 pm, Antonio Bleile wrote:
  >
  >>There is no way to "customize/program" the
  >>glBlendFunc, right?
  >
  >Right.
  >
  >>What about OpenGL 3? Will that allow it?
  >
  >No. At the hardware level there's a big gap
  >between the pixel shading operations and
  >the blending operations. Bringing them
  >together would kill performance.
  Alright.....
  Thank you guys!
  Toni

本文转自
http://objectmix.com/graphics/136729-programming-blend-function.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值