Giter VIP home page Giter VIP logo

Comments (24)

smdol avatar smdol commented on August 20, 2024

Was the bloom effect attached to the parent main camera or to the stereo left and right cameras?

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

Additional question: which version of the Cardboard SDK are you using?

from gvr-unity-sdk.

sh3rifme avatar sh3rifme commented on August 20, 2024

Hey, thanks for the fast replies! It's attached to the 'Main Camera' parent component. Ah, i meant to say v0.5 (of cardboard), not v5.0!

from gvr-unity-sdk.

sh3rifme avatar sh3rifme commented on August 20, 2024

I think it's worth noting the issue occurs even when there are no post-processing effects attached to the main camera.

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

OK. I am not able to reproduce this error. Can you look in the editor log file to see if it manages to put out any error messages before it disappears?

from gvr-unity-sdk.

sh3rifme avatar sh3rifme commented on August 20, 2024

Hey sorry it's taken me so long to get back to you, I've taken the log output and put it into this pastebin.

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

This looks like an important line:
RenderTexture.Create failed: format unsupported.

Does this only happen when the bloom effect is being used? Is it the standard Unity Bloom script, or some other one?

I guess the key thing to figure out know is that format. There might be one in the bloom script. Also, the default format for the Cardboard stereo texture is RGB565, which you can change in the BaseVrDevice.CreateStereoScreen() function, if you want to try that.

from gvr-unity-sdk.

MiCkSoftware avatar MiCkSoftware commented on August 20, 2024

Hi!

I had the same issue some time ago. It seems that render texture has some
problem with HDR cameras...

Cheers.
MiCk.

Le ven. 17 juil. 2015 03:16, smdol [email protected] a Γ©crit :

This looks like an important line:
RenderTexture.Create failed: format unsupported.

Does this only happen when the bloom effect is being used? Is it the
standard Unity Bloom script, or some other one?

I guess the key thing to figure out know is that format. There might be
one in the bloom script. Also, the default format for the Cardboard stereo
texture is RGB565, which you can change in the
BaseVrDevice.CreateStereoScreen() function, if you want to try that.

β€”
Reply to this email directly or view it on GitHub
#45 (comment)
.

from gvr-unity-sdk.

thesambassador avatar thesambassador commented on August 20, 2024

I'm hitting this issue too. To reproduce, I just downloaded the Cardboard SDK unity package, the Cardboard Demo unity package, and imported them both into a project. Then I opened up the demo scene, went to the StereoController component on the main camera, and unchecked "Direct Render." This causes it to crash for me 100% of the time (I have not added any image effects or done anything else to the demo scene).

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

@thesambassador What's your version of Unity?

from gvr-unity-sdk.

thesambassador avatar thesambassador commented on August 20, 2024

Actually, I went ahead and upgraded to the latest (5.1.3f1) and now it doesn't crash, but instead when I start it's throwing a bunch of errors.

RenderTexture.Create failed: format unsupported.
UnityEngine.Camera:Render()
CardboardEye:Render() (at Assets/Cardboard/Scripts/CardboardEye.cs:239)
StereoController:OnPreCull() (at Assets/Cardboard/Scripts/StereoController.cs:330)

Going into CardboardEye.cs, if I change the line
RenderTextureFormat format = stereoScreen ? stereoScreen.format : RenderTextureFormat.RGB565;

and change the RenderTextureFormat to RenderTextureFormat.Default, it "works", but doesn't look right (the sky covers other objects in the scene, the sky is black, the cardboard curved overlay is rendered funny).

Any ideas?

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

Can you post a screenshot? That's pretty wacky-sounding, and I don't think I've seen it before.

from gvr-unity-sdk.

thesambassador avatar thesambassador commented on August 20, 2024

Here's what it looks like when I launch it just by disabling DirectRender:

image

Here's what it looks like when I change the RenderTextureFormat to Default:
image

For reference, with DirectRender ON, here's how it looks (correctly):
image

Again, this is with no image effects added, I am ONLY just switching DirectRender on or off.

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

As an experiment, can you change your Build Platform to Android?

from gvr-unity-sdk.

thesambassador avatar thesambassador commented on August 20, 2024

No change, same as before.

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

OK, experiment #2: Direct Render off, Use RenderTextureFormat.Default, and in turn off DistortionCorrection on the CardboardMain object. (This just turns off the Image Effect that Unity is using in the Editor for distortion -- one less step in the pipeline.)

from gvr-unity-sdk.

thesambassador avatar thesambassador commented on August 20, 2024

Still seems the same... works, but the background is black and the particles out of the cube seem to not be rendering correctly.

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

I'm looking at your screenshot with the black sky. Something odd -- there's a faint bluish outline around the edge of the sky, where the vignette is supposed to be. It's like the blue sky is being rendered behind the black sky (which is also obscuring the particles).

from gvr-unity-sdk.

thesambassador avatar thesambassador commented on August 20, 2024

Yeah, it's really odd. Not sure what is going on there. I haven't changed anything in the demo scene, and it renders fine with the direct render.

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

OK, this is definitely strange. It seems to be specific to Windows (I have a Mac and don't experience any issue). So I'm shooting in the dark a bit, but let's see what we can do to characterize the problem a bit more.

Experiment #3: In the Cardboard.cs function AddDummyCamera(), change the color from black to something else. Does the mysterious black sky follow suit, or stay black?

Experiment #4: Comment out the use of AddDummyCamera() altogether. Does the problem still occur?

Experiment #5: In Player Settings, in the tab for Windows, clear the "Use DirectX 11" checkbox. This makes Unity use DirectX 9. Still get black sky? If no, can you go back to RGB565?

Experiment #6: Start Unity with --force-opengl (you'll have to edit the shortcut properties). You won't see in the title bar now. Same question as for #5.

In #3 and #4 I'm looking at what's going on in the depth buffer. In #5 and #6 it's about the graphics API the editor is using.

from gvr-unity-sdk.

thesambassador avatar thesambassador commented on August 20, 2024

Experiment 3 - Yes, I changed it to Color.green and the background changed to green!

Experiment 4 - Commenting out the AddDummyCamera seems to make the background pretty much gone, but adds a weird trail effect too:
image

Experiment 5 - I can't seem to set my DirectX settings in 5.1.3. According to the "what's new in Unity 5.1", they mention replacing the "Use DX11" checkbox with another setting, but I can't find what they are talking about.
https://unity3d.com/unity/whats-new/unity-5.1

Experiment 6 - Even with --force-opengl it seems like I have the same issue (black sky with default, error with RGB565)

from gvr-unity-sdk.

thesambassador avatar thesambassador commented on August 20, 2024

Ah wait! I figured out how to force DX 9. Setting it to DX 9 seems to be working with RGB565!

So I have a workaround, but it looks like DX 11 is the problem!

from gvr-unity-sdk.

smdol avatar smdol commented on August 20, 2024

I figured out the weird "Black Sky" effect you were seeing when using RenderTextureFormat.Default: If the render texture format has an alpha channel, then the non-direct-render path will blend the temporary render texture onto the screen. The default blue sky color on Main Camera has a nearly transparent alpha value, so it is getting blended away. I changed the alpha to 255 in the Main Camera's sky color, and the black sky effect is gone.

from gvr-unity-sdk.

nathanmartz avatar nathanmartz commented on August 20, 2024

Closing as this issue is fixed as far as we know.

from gvr-unity-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.