Lines Matching refs:shader
194 // handle the case where a "bound shader" is attached too.
195 auto shader = GetNativeMeta<SCENE_NS::IShader>(shaderJS);
196 if (shader == nullptr) {
197 // attaching to a bound shader. (if shader was bound to another material, we need to make a new copy)
202 ExecSyncTask([material, &shader]() -> META_NS::IAny::Ptr {
203 material->MaterialShader()->SetValue(shader);
208 // construct a "bound" shader object from the "non bound" one.
221 "shader", nullptr, META_NS::ObjectFlagBits::INTERNAL | META_NS::ObjectFlagBits::NATIVE));
223 ->GetPropertyByName<IntfPtr>("shader")
224 ->SetValue(interface_pointer_cast<CORE_NS::IInterface>(shader));
240 // no shader set yet..
242 // and create the "bound shader" object from it.
245 SCENE_NS::IShader::Ptr shader;
246 ExecSyncTask([material, &shader]() -> META_NS::IAny::Ptr {
247 shader = material->MaterialShader()->GetValue();
250 if (!shader) {
251 // no shader in native also.
255 // construct a "bound" shader object from the "non bound" one.
270 "shader", nullptr, META_NS::ObjectFlagBits::INTERNAL | META_NS::ObjectFlagBits::NATIVE));
272 ->GetPropertyByName<IntfPtr>("shader")
273 ->SetValue(interface_pointer_cast<CORE_NS::IInterface>(shader));