DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Culture and Methodologies
  3. Career Development
  4. Workaround: Remote Texture Loading Does Not Work With MRTK Standard Shader

Workaround: Remote Texture Loading Does Not Work With MRTK Standard Shader

Having trouble with remote texture loading on your MRTK Standard Shader? Check out this post to learn more about the workaround that can save you some trouble.

Joost van Schaik user avatar by
Joost van Schaik
·
Oct. 14, 18 · Tutorial
Like (3)
Save
Tweet
Share
7.44K Views

Join the DZone community and get the full member experience.

Join For Free

image

This is one of those things that can cost you hours to fix and drive you completely crazy. I was working on a new improved version of my HoloLens/Mixed Reality app AMS HoloATC, and this version was using a dynamic OpenStreetMap for geographical reference. So, I stole the OpenStreetMap slippy map from my own work. But, times have moved on, and I wanted to use the new Standard Shader from the Mixed Reality Toolkit, instead of the Unity Standard Shader, to be able to use the cool fluent effects, like the Hover Light.

Unfortunately, I not only got some fluent options that worked beautifully but also some problems. If I used my DynamicTextureLoader that I wrote about like 1.5 years ago to download map tiles from the Internet, nothing happened. The texture is downloaded and applied, but it never shows up.

To show you what it looks like, I made a demo project:

image

And as you can see on the most right picture, I got it to work as well.

The trick is in the materials. The difference is hard to spot, but one of the panels using an MRTK standard already has a dummy texture at startup:

image

This is fairly easy to achieve, like this:

image

It's a file of literally one white pixel. This suggests that there is something in the MRTK Standard Shader that looks for textures at startup, and if there is no texture present, subsequent changes of the texture are ignored. I don't know if it's a bug or intentional — some kind of performance optimization — but this trick gives you textures and fluent stuff.

A little demo project showing this trick can be found here.

Texture (app) workplace Workaround

Published at DZone with permission of Joost van Schaik, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How Do the Docker Client and Docker Servers Work?
  • Real-Time Stream Processing With Hazelcast and StreamNative
  • Using JSON Web Encryption (JWE)
  • Top Five Tools for AI-based Test Automation

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: