unity-xr-plugin icon indicating copy to clipboard operation
unity-xr-plugin copied to clipboard

Problem enabling MSAA

Open paulodgn opened this issue 3 years ago • 5 comments

I get the following error entering play mode, if MSAA anti aliasing is enbaled, using Forward rendering:

"A multisampled texture being bound to a non-multisampled sampler. Disabling in order to avoid undefined behavior. Please use Texture2DMS in the shader."

paulodgn avatar May 05 '21 14:05 paulodgn

Hi @paulodgn - were you still having an issue after you've had a look at your shader and used texture2dms? or is this coming from one of our demos?

1runeberg avatar May 07 '21 02:05 1runeberg

Hi @1runeberg , thank you for reply. I am not using any custom shader, only Unity default ones, so no idea what shader can be the cause of this. I can reproduce the error:

1 - Install Unity 2020.2.1f1 2 - Create project with HDRP Template 3 - Open Unity Sample Scene. The one with a long building with several rooms. 4 - Import OpenVR XR package 5 - Add CameraRig prefab to the hierarchy 6 - On HDRP settings set render mode to Forward 7 - On the CameraRig camera enable Custom Frame Settings and chose MSAA within Forward 8 - Press play

Hope it helps.

paulodgn avatar May 07 '21 09:05 paulodgn

@paulodgn This is probably better raised directly with Unity. The test scene's shaders may not be compatible with MSAA and forward so you might need to modify shaders to work on this config that you want.

1runeberg avatar May 07 '21 22:05 1runeberg

@1runeberg I posted the issue here because if you use the regular Unity camera without VR MSAA works as intended. The error only appears in VR mode using OpenVR.

paulodgn avatar May 08 '21 10:05 paulodgn

@paulodgn The underlying XR render paths are different than Desktop, the error being emitted is engine-related and doesn't appear to be anything related to the plugin side, so should be reported directly to Unity as we don't have any control over engine code, especially built-in shaders.

1runeberg avatar May 08 '21 19:05 1runeberg