From Licensee:
When we have Instanced Stereo enabled, all our materials that use Scene expression nodes (SceneDepth, SceneColor, etc...), render incorrectly in the right eye. It only happens to the ones that have something plugged into the UVs slot.
[Image Removed]
[Image Removed]
We were able to fix this issue by changing in TranslucentRendering.cpp:
line 824 in static void UpdateSeparateTranslucencyViewState()
- SetupDownsampledTranslucencyViewParameters(InstancedView, TextureExtent, GetScaledRect(InstancedView.ViewRect, ViewportScale), DownsampledTranslucencyViewParameters);
to
- SetupDownsampledTranslucencyViewParameters(InstancedView, TextureExtent, GetScaledRect(View.ViewRect, ViewportScale), DownsampledTranslucencyViewParameters);
The size passed to update the instanced buffer for the right eye was wrong.
Follow up from licensee:
Unfortunately we just found out this fix isn't sufficient as it breaks some other stuff.
The main problem here lies in the range of UV's used by different material functions.
For example, TexCoord[0] always gives UV's between 0 and 1.
The SceneColor OffsetFraction mode however uses the ScreenPosition node as internal input UV's to offset. These UV's range from 0 to 2 when using Instanced Stereo.
[Image Removed]
Thus, as far as I know, there is no situation where the scene color texture can be read correctly for both nodes. Same issues apply to scene depth.
One solution would be to change GetViewportUV() (and normalizing any other nodes using UV's) to return [0,1] but this would require changing a bunch of other functions as well and probably will get pretty messy.
For now we have created a materialnode 'EyeIndex' which returns 0 or 1 based on what view is currently being rendered. Using this node, we can work around some problems manually but some cannot be fixed in this way.
From Licensee:
Create a new empty UE.26 project
Create a new material -> Blend Mode: Translucent -> Add a 'Scene Color' and 'TexCoord' node -> Plug the TexCoord node in the UV slot of the Scene Color -> Plug the Scene Color into the Base Color output slot.
Create a new level: New Level -> Default
Create a plane and assign the newly created material on it.
Play in VR to check. The right eye should show a different result.
[Link Removed]Attached project reproduced this for me with OpenXR and Oculus Rift S
Status update on UE-21075 and UE-20622?
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-106768 in the post.
2 |
Component | UE - Platform - XR |
---|---|
Affects Versions | 4.26, 5.1 |
Target Fix | 5.6 |
Created | Jan 19, 2021 |
---|---|
Updated | Oct 18, 2024 |