mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture map enabled
OpenGl_ShaderManager::defaultGlslVersion() now defines GLSL 120 for normal map texture.
This commit is contained in:
parent
fccc168a6f
commit
1e1158c78b
@ -1793,6 +1793,14 @@ int OpenGl_ShaderManager::defaultGlslVersion (const Handle(Graphic3d_ShaderProgr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const bool toUseMat2x3 = (theBits & OpenGl_PO_HasTextures) == OpenGl_PO_TextureNormal;
|
||||||
|
if (toUseMat2x3) // TangentSpaceNormal() function uses mat2x3 type
|
||||||
|
{
|
||||||
|
if (myContext->IsGlGreaterEqual (2, 1))
|
||||||
|
{
|
||||||
|
theProgram->SetHeader ("#version 120");
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((theBits & OpenGl_PO_StippleLine) != 0
|
if ((theBits & OpenGl_PO_StippleLine) != 0
|
||||||
|| theProgram->IsPBR())
|
|| theProgram->IsPBR())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user