Comments (24)
Was the bloom effect attached to the parent main camera or to the stereo left and right cameras?
from gvr-unity-sdk.
Additional question: which version of the Cardboard SDK are you using?
from gvr-unity-sdk.
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.
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.
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.
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.
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.
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.
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.
@thesambassador What's your version of Unity?
from gvr-unity-sdk.
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.
Can you post a screenshot? That's pretty wacky-sounding, and I don't think I've seen it before.
from gvr-unity-sdk.
Here's what it looks like when I launch it just by disabling DirectRender:
Here's what it looks like when I change the RenderTextureFormat to Default:
For reference, with DirectRender ON, here's how it looks (correctly):
Again, this is with no image effects added, I am ONLY just switching DirectRender on or off.
from gvr-unity-sdk.
As an experiment, can you change your Build Platform to Android?
from gvr-unity-sdk.
No change, same as before.
from gvr-unity-sdk.
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.
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.
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.
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.
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.
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:
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.
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.
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.
Closing as this issue is fixed as far as we know.
from gvr-unity-sdk.
Related Issues (20)
- Not working for LWRP (only left eye rendered) HOT 4
- Building to iOS fails Unity 2019.3.0b + Google VR + Universal Render Pipeline
- Distortion Correction Toggling with Unity and Daydream
- Can it work for Gear VR? HOT 1
- ios 13 beta xcode11 without error log when running, but the splash screen pops out
- Detecting if a recenter event just happened appears to be broken HOT 1
- Still getting "GvrShimUnity: getControllerConnectionStatus device 0 api" even with [email protected] HOT 1
- HLS live 360 playback is distorted on Oculus Go HOT 2
- How to turn on deinterlace using OpenGL
- Mirage Solo instant preview "not connected to editor"
- Mirage Solo - Instant Preview "Not connected to editor"
- googleVR Scaling issue.
- GVR audio engine issue?
- Zoom in Cardbard
- Cardboard stereo view mask does not fit into a Xiaomi with display aspect ratio greater than 2.1
- Weird image glitch with Universal Rendering Pipeline HOT 6
- [Question] Is there a way to use the controller without displaying two eyes
- Arrow on iphone HOT 4
- Camera Viewport Rect
- Magic Window launches with offset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gvr-unity-sdk.