From: seungho baek Date: Fri, 1 Sep 2023 07:52:42 +0000 (+0900) Subject: Make subsurface texture not be enabled in dli X-Git-Tag: dali_2.2.43~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F298144%2F4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Make subsurface texture not be enabled in dli - dli shaders not use subsurface sampler but the texture is added to textureSet Change-Id: I2aab8f8e91c663cdc49cdb97a6e4a3a54efc014f Signed-off-by: seungho baek --- diff --git a/dali-scene3d/internal/loader/dli-loader-impl.cpp b/dali-scene3d/internal/loader/dli-loader-impl.cpp index a4dbeda..668a10c 100644 --- a/dali-scene3d/internal/loader/dli-loader-impl.cpp +++ b/dali-scene3d/internal/loader/dli-loader-impl.cpp @@ -667,6 +667,12 @@ void DliLoaderImpl::Impl::ParseShaders(const TreeNode* shaders, Dali::Scene3D::L auto& node = (*i0).second; ShaderDefinition shaderDef; ReadStringVector(node.GetChild("defines"), shaderDef.mDefines); + auto sssIter = std::find_if(shaderDef.mDefines.begin(), shaderDef.mDefines.end(), [](std::string& item) + { return (item == "SSS"); }); + if(sssIter != shaderDef.mDefines.end()) + { + shaderDef.mDefines.erase(sssIter); + } // Read shader hints. Possible values are: // Don't define for No hints. @@ -1027,14 +1033,17 @@ void DliLoaderImpl::Impl::ParseMaterials(const TreeNode* materials, DliInputPara materialDef.mFlags |= semantic; } - if(ReadString(node.GetChild("subsurfaceMap"), texturePath)) - { - ToUnixFileSeparators(texturePath); - - const auto semantic = MaterialDefinition::SUBSURFACE; - materialDef.mTextureStages.push_back({semantic, TextureDefinition{std::move(texturePath)}}); - materialDef.mFlags |= semantic; - } +/// @TODO : Some dli shader don't implement this subsurfaceMp usage. +/// To make visual test pass, Skip subsurfaceMap texture using +/// until dli shaders are support it. +// if(ReadString(node.GetChild("subsurfaceMap"), texturePath)) +// { +// ToUnixFileSeparators(texturePath); +// +// const auto semantic = MaterialDefinition::SUBSURFACE; +// materialDef.mTextureStages.push_back({semantic, TextureDefinition{std::move(texturePath)}}); +// materialDef.mFlags |= semantic; +// } if(ReadString(node.GetChild("occlusionMap"), texturePath)) {