mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031096: Visualization, TKOpenGl - support metallic-roughness texture mapping
OpenGl_ShaderManager - metallic-roughness, emissive, occlusion and normal texture maps are now supported by PBR. Emissive, occlusion and normal texture maps are now supported by Phong shading model. Path-Tracing now handles metallic-roughness and emissive texture maps. Graphic3d_TextureUnit enumeration has been extended by new values corresponding to supported texture maps. OpenGl_TextureSet and OpenGl_ShaderProgram have been extended with bitmask Graphic3d_TextureSetBits identifying texture slots read from GLSL Program and slots defined within Texture Set to avoid undefined behavior by binding mock textures. OpenGl_TextureSet now duplicates texture unit information to handle textures shared across multiple slots (like Occlusion [R] + Metallic-Roughness [GB]). OpenGl_Context::BindTextures() has been extended with active GLSL program paramter to set mock textures to texture units used by program but undefined by texture set. OpenGl_Workspace::ApplyAspects() has been extended with parameter to avoid bining texture set.
This commit is contained in:
@@ -31,6 +31,8 @@ XCAFPrs_Texture::XCAFPrs_Texture (const Image_Texture& theImageSource,
|
||||
myTexId = myImageSource.TextureId();
|
||||
}
|
||||
myParams->SetTextureUnit (theUnit);
|
||||
myIsColorMap = theUnit == Graphic3d_TextureUnit_BaseColor
|
||||
|| theUnit == Graphic3d_TextureUnit_Emissive;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Reference in New Issue
Block a user