Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by bziii · Mar 03, 2011 at 08:16 AM · camerastandaloneopenglpccubemap

OpenGL Camera.RenderToCubemap fails

I'm basicly using this script http://unity3d.com/support/documentation/ScriptReference/Camera.RenderToCubemap.html in forced OpenGL mode, and the line cam.RenderToCubemap(rtex, faceMask) always returns false.

  • Does Camera.RenderToCubemap always fail in forced OpenGL mode on PC Standalones, or does that depend on the GPU?

Comment
Add comment · Show 3
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 bziii · Mar 03, 2011 at 08:35 AM 0
Share

Just to add, I'm using Forward rendering and everything works in normal DirectX mode - but I need to use forced OpenGL because I'm getting a texture from a native plugin.

avatar image Statement · Mar 03, 2011 at 12:58 PM 0
Share

I am not aware of the differences between OpenGL and DirectX in regard to Unity, but maybe your native plugin have some odd texture format? Just a far shot.

avatar image bziii · Mar 03, 2011 at 02:39 PM 0
Share

Nope, straight OpenGL BGR 8bit per channel format. I don't think that's an odd format.

2 Replies

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

Answer by bziii · Mar 06, 2011 at 11:58 AM

The Camera.RenderToCubemap() in forced OpenGL is supported on some GPU's, depending on the model and the drivers.

So the correct usage would be to try rendering to a cubemap and if it fails (returns false), fallback to 6 camera shots using render targets and constructing a cubemap using Cubemap.SetPixels().

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
1

Answer by Statement · Mar 03, 2011 at 01:16 PM

This function will return false if rendering to cubemap fails. Some graphics hardware does not support the functionality.

This is all information they provide (apart from you need Unity PRO). Do you have access to try this on other machines with other GPUs? It shouldn't be the hardware that fail since it works in DirectX (on the same machine?), possibly some driver/opengl issue. I hope someone sheds light on this for you.

Comment
Add comment · Show 1 · 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 bziii · Mar 03, 2011 at 02:40 PM 0
Share

I'm guessing it is a driver issue, will test on other machines.

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

No one has followed this question yet.

Related Questions

Camera not working on different computer 0 Answers

keyboard launch when clicking on text area. 0 Answers

how to use Indoor cube map correctly? 1 Answer

Assigning a render texture to many objects? 0 Answers

2 PC standalones, one on each monitor in 2 monitor setup 4 Answers


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