X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-scene-loader%2Fpublic-api%2Fshader-definition-factory.cpp;h=bd6b168d71822713cbe9348afe9f36f49ed4eb66;hb=4bc73f2e78812b262f09830bb2b1d87034f34496;hp=843fbcf6eb032f08274cce3b9292fb2298ffdffa;hpb=f2039d47f9bed8104575da80a2ecf0bb6e37ff8d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-scene-loader/public-api/shader-definition-factory.cpp b/dali-scene-loader/public-api/shader-definition-factory.cpp index 843fbcf..bd6b168 100644 --- a/dali-scene-loader/public-api/shader-definition-factory.cpp +++ b/dali-scene-loader/public-api/shader-definition-factory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -96,6 +96,11 @@ uint64_t HashNode(const NodeDefinition& nodeDef, const MaterialDefinition& mater hash.Add("SSS"); } + if(MaskMatch(materialDef.mFlags, MaterialDefinition::OCCLUSION)) + { + hash.Add("OCCL" /*USION*/); + } + if(MaskMatch(materialDef.mFlags, MaterialDefinition::GLTF_CHANNELS)) { hash.Add("GLTF" /*_CHANNELS*/); @@ -217,6 +222,11 @@ Index ShaderDefinitionFactory::ProduceShader(const NodeDefinition& nodeDef) shaderDef.mDefines.push_back("SSS"); } + if(MaskMatch(receiver.mMaterialDef->mFlags, MaterialDefinition::OCCLUSION)) + { + shaderDef.mDefines.push_back("OCCLUSION"); + } + if(MaskMatch(receiver.mMaterialDef->mFlags, MaterialDefinition::GLTF_CHANNELS)) { shaderDef.mDefines.push_back("GLTF_CHANNELS");