mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029337: Visualization, TKOpenGl - visual artifacts on Intel Broadwell GPU
Enable multiple draw buffers in shader program only if its required by specific application. occSetFragColor() - a new GLSL function has been introduced as an alternative to setting occFragColor/occFragCoverage variables.
This commit is contained in:
@@ -736,7 +736,8 @@ static Standard_Integer VShaderProg (Draw_Interpretor& /*theDI*/,
|
||||
const TCollection_AsciiString& aShaderSrc = aShader->Source();
|
||||
|
||||
const bool hasVertPos = aShaderSrc.Search ("gl_Position") != -1;
|
||||
const bool hasFragColor = aShaderSrc.Search ("occFragColor") != -1
|
||||
const bool hasFragColor = aShaderSrc.Search ("occSetFragColor") != -1
|
||||
|| aShaderSrc.Search ("occFragColor") != -1
|
||||
|| aShaderSrc.Search ("gl_FragColor") != -1
|
||||
|| aShaderSrc.Search ("gl_FragData") != -1;
|
||||
Graphic3d_TypeOfShaderObject aShaderType = aShaderTypeArg;
|
||||
@@ -768,6 +769,13 @@ static Standard_Integer VShaderProg (Draw_Interpretor& /*theDI*/,
|
||||
}
|
||||
}
|
||||
|
||||
if (!aProgram.IsNull()
|
||||
&& ViewerTest::CurrentView()->RenderingParams().TransparencyMethod == Graphic3d_RTM_BLEND_OIT)
|
||||
{
|
||||
aProgram->SetNbFragmentOutputs (2);
|
||||
aProgram->SetWeightOitOutput (true);
|
||||
}
|
||||
|
||||
ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName aGlobalPrsIter (GetMapOfAIS());
|
||||
NCollection_Sequence<Handle(AIS_InteractiveObject)>::Iterator aPrsIter (aPrsList);
|
||||
const bool isGlobalList = aPrsList.IsEmpty();
|
||||
|
Reference in New Issue
Block a user