AnsweredAssumed Answered

Slow stencil texture (OpenGL)

Question asked by duzenko on Sep 20, 2017

I'm trying to add soft shadows to a modified Doom3 engine using FBO + stencil texture attachment that I bind and use in the light interaction fragment shader. It works good enough, but there's a serious performance problem on a Radeon 460 (I don't have other AMD GPU's but suspect it's same or worse since it's relatively new).

I'm on the latest drivers.

The fps drop is so bad that it's actually faster to do qglCopyTexImage2D to another texture (per each light!) than bind the stencil texture used in FBO.

Another problem is that when I try to optimize qglCopyTexImage2D with qglCopyTexSubImage2D it's starting to flicker.

Any real-use advice on stencil texture from fellow programmers?

Both nVidia and Intel appear to perform well in regard of speed here.