microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Post processing layer on MRTK camera makes left eye white #4655

Closed gongminmin closed 9 months ago

gongminmin commented 5 years ago

Reported by partner company IF IOT.

Describe the bug

After attaching a post processing layer to MRTK camera, on HL2, left eye is pure white, right eye is OK.

To reproduce

Steps to reproduce the behavior:

  1. Add emissive to material
  2. Add post process layers to MRTK camera
  3. Build and deploy to HL2
  4. See the incorrect rendering results

Expected behavior

Both eye looks ok

Your Setup (please complete the following information)

Target Platform (please complete the following information)

thePostFuturist commented 4 years ago

Bug persists on 2019.2 MRTK v2.1.0

adamkvd commented 4 years ago

Is there a current workaround to get post-processing working on HoloLens 2, or a recommended alternative to the default post-processing stack?

stale[bot] commented 4 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] commented 4 years ago

This issue has been closed by an automated process because it is stale. If this is still an issue please add a new comment with more recent details and repro steps.

vacs-hoantt commented 4 years ago

reopen, i use unity 2019.3.7 + mrtk 2.4.0, post process not working for me

lukianol commented 4 years ago

I believe I'm affected to on Oculus Quest + Unity with post processing stack

Goldrake99 commented 3 years ago

Same here with mrtk 2.5.3

Waffle1434 commented 3 years ago

Still present on Hololens 2 with latest MRTK on Unity 2019.4.21f LTS All I wanted was some anti aliasing, not even the whole post process stack.

CyberBYTE24 commented 3 years ago

The bug is still here on "Unity 2020.3.9f1" & "MRTK 2.7.2" too Hololens (1 Gen)

zhangq08 commented 3 years ago

change render mode from single pass (Instanced) to multi pass may solve the problem.

graemeaj commented 2 years ago

change render mode from single pass (Instanced) to multi pass may solve the problem.

It unfortunately behaves the same in any rendering mode. 2019.4.23 with MRTK 2.7.2

ykaradayi commented 2 years ago

Also having this problem! Has anyone come across a solution yet?

epratt000 commented 2 years ago

Came up to this problem today using Unity 2021.3.6f1 and MRTK 2.8.2.

Hope they come up with a solution soon.

goodgoodstudy2021 commented 2 years ago

Get this Bug Using Unity 2020.3.40f1c1 and MRTK3. with the Log: Argument Exception Invalid Shader

keveleigh commented 2 years ago

Hello all! I know this is an old issue, but it's had pretty consistent traffic over the last few years without a response. Our bad on that one.

MRTK doesn't do anything specific with post processing, so I'm guessing this is either a Unity issue or a configuration issue. Hopefully the latter, which will be easier to fix 😅

For anybody still looking at this thread:

  1. Are you using custom shaders or built-in Unity shaders?
    1. If a built-in, which shader are you using?
    2. If a custom, have you added the macros described on https://docs.unity3d.com/Manual/SinglePassInstancing.html under "Post-Processing shaders" (in addition to the macros in the general "Custom shaders" section as well)?
image
Waffle1434 commented 1 year ago

Trust me its not a config or Unity issue, its very specific to MRTK. Unity's post processing supports VR, both for single pass and multipass. I know MRTK is doing something special when it comes to the camera's render target, its probably to do with that.

keveleigh commented 1 year ago

I know MRTK is doing something special when it comes to the camera's render target, its probably to do with that.

I'm not sure what this is referring to! Could you point me to where MRTK is doing something to the render target please?

ykaradayi commented 1 year ago

I am using the built-in Depth Of Field post processing blur effect for Hololens 2 myself, on Unity 2020.3.15f2 although I am open to updating it if a fix is found on another version.

It does seem to have something to do with multi vs single pass instancing but because it's built in and I have no experience with shaders, I've been unable to resolve this issue.

CraftingHeroesSean commented 1 year ago

This happened to us in a build on Unity 2021.3.12f1. Still an issue. MRTK 2.3.8.0. Kind of took us by surprise, because it doesn't happen when we use remoting and run the program inside of the Unity editor. Only happens in builds. :-/

coltonix commented 11 months ago

Has anyone resolved the issue? I'm on Unity 2021.3.3 LTS, MRTK 3. Never had the problem until I used both custom shader and built-in shader materials with emission/inner glow turned on and also used Post processing layer for camera. The run on the Hololens emulator is fine while not so much on the HoloLens2 device.

-- Update: Very strange that the issue still persists after I switched the camera back to default layer and turned off emission/innerglow on all the used materials.

-- Update 2: Strangely, it is working now after I changed the render mode from single pass (Instanced) to multi pass as @zhangq08 suggested. image

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!