Comments (9)
Hi, just to provide some further insight, I attempted to use the Oculus SDK OVRCameraRig which allows you to choose either two separate cameras (one per eye) or a single one. Unfortunately, this didn't work properly with either.
When adding the Volumetric Light Renderer to each eye's camera separately, by default the volumetric lights appear only in the second camera (right eye) but not the first one (left eye). If you change the "depth" of the camera, the camera with the lowest depth shows the effect whilst the other one does not. Switching between deferred and forward rendering for both cameras also does not change the behaviour. One interesting point is that if you choose Single Pass Stereoscopic Rendering as opposed to the default Multi-Pass Stereoscopic Rendering, there are problems because the shader breaks the image (get a weird overlay and resolution is all wrong - it seems that a lot of effects, even standard Unity ones such as "Bloom" or "Sun Shafts" etc. also break) but it seems like the effect works for both cameras. So possibly there is a compatibility issue with the multi-pass rendering?
@SlightlyMad I would be willing to help with testing of new changes and contribute in any way. Thanks.
from volumetriclights.
VR isn't supported. I don't have VR kit to test it and I don't plan to buy one. I'll accept pull request if somebody finds a way how to fix it and I'll update readme for now.
from volumetriclights.
I got this working on Unity 2017.3.0f3
Opening example scene
Enabling PlayerSettings - XR Settings - Virtual Reality Supported
Duplicating Main Camera
Setting Camera 1 to left eye
Setting Camera 2 to right eye
Tried on HTC Vive and it looks pretty good.
The Directional light examples all worked but spotlight ones render to one eye hence the workaround above.
from volumetriclights.
@SlightlyMad I'm also willing to help test any changes on the HTC Vive. That way we can cover both platforms.
from volumetriclights.
Pinging @Knive, @Edgyy and @chrisnobrega to check if any of you looked into this further. Maybe we can figure out what is going on together.
Trying the examples with the SteamVR plugin I can get the effect to work on one eye at a time only:
cam one target | cam two target | result left | result right |
---|---|---|---|
left | right | no effect | effect |
right | left | effect | no effect |
left | left | no effect | black |
left | off | effect | black |
off | left | effect | off |
right | right | black | no effect |
off | right | black | effect |
right | off | black | effect |
I'm new to Unity and not quite sure about the way the two images for your different eyes get rendered. When I put a debug script line into the VolumetricLightRenderer
script to check what camera it is drawing to, I get both
. I was hoping it was somehow just drawing to one eye.
Debug.Log ("render to: ___" + _camera.stereoTargetEye +"___", _camera);
// Outputs: render to ___Both___
from volumetriclights.
This is exactly the issue. Set the camera to only draw to one eye, and create a separate camera for the other eye, that will work fine!
from volumetriclights.
Unity hangs when i have two Steam VR_Camera cameras in the SteamVR rig and press play
from volumetriclights.
The issue here is the steam vr camera component. You should only have one of that.
from volumetriclights.
For now, it works in Unity with Multpass on. I am using Unity 2017.4.8f1 and OpenVR. It is correct rendered on both eye if the light don't cast any shadow.
Wired thing about light casting shadow, it only show on the left eye. I am looking into this now.
from volumetriclights.
Related Issues (20)
- Error when used with XBOX ONE as UWP App HOT 1
- Effect disabled after using light for baking HOT 1
- Not showing for newer mac versions. HOT 2
- Won't work on unity 2018.1.0b12 with Lightweight render pipeline HOT 3
- Things sometimes look dark (2017.3.1f1) HOT 2
- Dont work in unity 2018
- Works and displays perfectly in editor but invisible in a standalone Windows Build
- Changing shadow strength on a light affects volumetric shadows on another light
- Nothing with HD Render Pipeline HOT 2
- Doesn't work with Orthographic camera, unless near clipping plane is set very high
- Does not work on WebGL
- Add Support for VR HOT 1
- Volumetric light Disappears in Unity 2019.1 (old render pipeline not HDRP or LWRP) HOT 1
- Volumetric lights disabled in built package HOT 3
- Wont work in specific scene
- URP version?? HOT 1
- I get an error when playing
- Returning black screen in release builds. HOT 1
- Build a package
- Volumetric lighting disappears when spot light doesn't collide with anything? HOT 1
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 volumetriclights.