iOS Shader Bug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
iOS Shader Bug
Hi Community,
When I use a highlight shader on a semi transparent model item on my iPhone, the model item loses its transparency after the shader is changed back to normal. but it works in preview. See video of bug:
- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
This is a modal window. This modal can be closed by pressing the Escape key or activating the close button.
Thanks for your help!
Best wishes,
Alex
Solved! Go to Solution.
- Labels:
-
Troubleshooting
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AlexK ,
I think the described issue is a problem already described in the post ( https://community.ptc.com/t5/Vuforia-Studio/Toggling-of-Shaders-not-working/m-p/713237#M9399 ) and reported to PTC dev team. There is a workaround to use instead of Default shader the "" to remove the shader form the modelItem. Something like this;
//set the properties of the TML 3D Renderer to highlight the selected item using a TML Text shader. "green" is the name of the script for the TML Text.
var shader =(Math.random() < 0.5) ? "blue": "green";
tml3dRenderer.setProperties(item, hilite === true ? { shader: shader, hidden: false, opacity: 0.9, phantom: false, decal: true }
: { shader: "", hidden: false, opacity: 1.0, phantom: false, decal: false });
Alternatively you can use for transparence other shaders like xray , class or others which will have visual effects like transparency .
I attached an example which use 3 different shaders. You need to click on component (where not modelItem are defined -the project js does not handle the modelitem widget and therefore a userpick on the both modelItems widgets does not have any effects) , where it set randomly the green or blue shader /tml text definition. Also at the start the both modelItem widgets : modelItem-1 is initialized with xref shader and modelItem-2 has opacity 0.5
Here I attached the project what I tested. Please, let me know if you have questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AlexK ,
I think the described issue is a problem already described in the post ( https://community.ptc.com/t5/Vuforia-Studio/Toggling-of-Shaders-not-working/m-p/713237#M9399 ) and reported to PTC dev team. There is a workaround to use instead of Default shader the "" to remove the shader form the modelItem. Something like this;
//set the properties of the TML 3D Renderer to highlight the selected item using a TML Text shader. "green" is the name of the script for the TML Text.
var shader =(Math.random() < 0.5) ? "blue": "green";
tml3dRenderer.setProperties(item, hilite === true ? { shader: shader, hidden: false, opacity: 0.9, phantom: false, decal: true }
: { shader: "", hidden: false, opacity: 1.0, phantom: false, decal: false });
Alternatively you can use for transparence other shaders like xray , class or others which will have visual effects like transparency .
I attached an example which use 3 different shaders. You need to click on component (where not modelItem are defined -the project js does not handle the modelitem widget and therefore a userpick on the both modelItems widgets does not have any effects) , where it set randomly the green or blue shader /tml text definition. Also at the start the both modelItem widgets : modelItem-1 is initialized with xref shader and modelItem-2 has opacity 0.5
Here I attached the project what I tested. Please, let me know if you have questions.
