Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Macdude2 · Jun 25, 2011 at 08:03 AM · textureiphonerender

Render to texture works on computer, but not on iphone

My problem with render textures is a rather complicated one. I have two render textures in my scene, each rendering something different and each has a perspective matrix (from the same code) applied to it. Both of these textures work exactly how I want them to on my computer and on a computer app build. However, when I build it to the iphone, only one of these textures shows up. I was thinking that the iphone was somehow killing one render texture because the second texture was using too much ram, but when I deactivated the working render texture, and rebuilt the scene with only the one previously non-working texture, this texture still did not show up (just pure black) even though it was the only one in the scene. I have also built the scene with one working camera rendering its texture to two objects and tested this on the iphone and it works. Just some background knowledge, I have built an app using two render textures before that have been displayed correctly.

So my question is, why would both textures get rendered in the editor and in the play view and when built for the computer, but not get rendered when built for the iphone? I suppose I could try deleting the broken one and recreating it, but I still cannot answer the question above. I would love any suggestions.

Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image raminsh · Jun 25, 2011 at 08:15 AM 0
Share

hi, I have a question for you. are you using textures with transparency? perhaps png files?

avatar image Macdude2 · Jun 25, 2011 at 08:26 AM 0
Share

Nope, just simple render textures with diffuse shaders and the main colors are off white on both. They are both set up exactly the same, it is just one camera is in a different position than the other one. However only camera's texture is showing up on the iphone build.

avatar image raminsh · Jun 25, 2011 at 08:30 AM 0
Share

Ok this is kind of strange. I believe you have 2 cameras in your scene? Could you attach a picture or something just so i can see what exactly going on?

avatar image Macdude2 · Jun 25, 2011 at 06:07 PM 0
Share

Ok, this is the picture of what it should look like:

http://www.flickr.com/photos/64364958@N03/5869741247/

This is the picture of what it does look like(a screen shot taken from my iphone):

http://www.flickr.com/photos/64364958@N03/5870299504/

Finally a picture of the scene in play mode and the editor also showing what it is supposed to show:

http://www.flickr.com/photos/64364958@N03/5870299620/

Thanks for your help.

avatar image Macdude2 · Jun 26, 2011 at 05:46 AM 0
Share

Just wanted to let you know I was able to solve this problem by just deleting the object the camera's feed was rendering to and recreate a new one. Hope this helps anyone who has this same problem.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Macdude2 · Jun 27, 2011 at 04:44 AM

I was able to completely fix this problem by deleting the old object and creating a new one. This worked for me twice so I am quite confidant this is a valid solution. I am sure this will come up later and I just want others to know that the fix is simple.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Dreamora · Jun 27, 2011 at 12:45 AM

Reasons for render textures not working at least as far as I know:

  1. Ensure the format is even supported you try to use (render textures with depth will not work, larger than 1024 x 1024 does not work either, not all desktop color formats are valid, I think only ARGB8 and the 16bit one work)

  2. How are you handling the two? is it the same code or is the code management of them differently?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

OpenGLES error 0x0502 when TextureFormat.BGRA32 is used 0 Answers

Render to Texture artifacts 0 Answers

Black Textures on iPhone 3 Answers

Why the "target texture" option is enabled in Unity iPhone Advance for all the cameras? 3 Answers

Get a portion of a Texture2D to another Texture2D 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges