Giter VIP home page Giter VIP logo

Comments (9)

Edgyy avatar Edgyy commented on July 21, 2024 2

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.

SlightlyMad avatar SlightlyMad commented on July 21, 2024 1

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.

millenniummike avatar millenniummike commented on July 21, 2024 1

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.

chrisnobrega avatar chrisnobrega commented on July 21, 2024

@SlightlyMad I'm also willing to help test any changes on the HTC Vive. That way we can cover both platforms.

from volumetriclights.

javl avatar javl commented on July 21, 2024

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.

kwnetzwelt avatar kwnetzwelt commented on July 21, 2024

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.

nights321 avatar nights321 commented on July 21, 2024

Unity hangs when i have two Steam VR_Camera cameras in the SteamVR rig and press play

from volumetriclights.

kwnetzwelt avatar kwnetzwelt commented on July 21, 2024

The issue here is the steam vr camera component. You should only have one of that.

from volumetriclights.

ruonanzh avatar ruonanzh commented on July 21, 2024

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)

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.