When I set the glStencilFunc( GL_NEVER, . . . )effective shutdown of the entire drawing and then run my program [shader binding], I do not get a performance increase, allowing me to run the fragment shader. I thought the stencil test happened before the fragments program. Is this not so, or at least not guaranteed? Replacing a fragment shader with one that simply writes the gl_FragColor constant results in a higher FPS.
glStencilFunc( GL_NEVER, . . . )
Take a look at the following contour for the DX10 pipeline, it says that the stencil test runs before the pixel shader:
http://3.bp.blogspot.com/_2YU3pmPHKN4/Sz_0vqlzrBI/AAAAAAAAAAcg/CpDXxOB-r3U/s1600-h/D3D10CheatSheet.jpg
and the same is true in DX11:
http://4.bp.blogspot.com/_2YU3pmPHKN4/S1KhDSPmotI/AAAAAAAAAcw/d38b4oA_DxM/s1600-h/DX11.JPG
I do not know if this complies with the OpenGL specifications, but it would be harmful for the implementation not to perform a screen check before running the fragment program.
. , OpenGL ES 2.0. , z, , .
AMD/ATI, . , , , , , , . OpenGL .
, / . z- , , , - discard.
discard
GPU /z , z/, , , , z-, . , , .
: http://www.opengl.org/wiki/Stencil_Test . , .
Source: https://habr.com/ru/post/1743768/More articles:CodeIgniter form_hidden - phpdefine constant in php - phpOverloading new, removal in C ++ - c ++Hibernate HQL and Grails. How to compare collections? - collectionsProblems installing Moose on Mac (compiling Sub :: Name prereq) - perlHow to align title bar text in each line on the right? - iphoneiPhone: convert Nsstring to Nsdate on device timezone - timezoneHow to run an ordered list of 2 not 1 with w3c validity and compatibility with IE 6? - cssRegister in a SQLite database from a C # Windows Forms application - c #Php regex file name - phpAll Articles