bool nearer = (nearestRawDepth < raw_depth);
nearestRawDepth = nearer ? raw_depth : nearestRawDepth;
nearestColor = nearer ? neighbour : nearestColor;
I am using this to get nearest color and depth values, however using this makes my project unable to compile. I tried if statements with this too and got the same error.
Severity Code Description Project File Line Suppression State
Error MSB3073 The command "dotnet mgcb /quiet /@:"D:\monogame_projects\tdpe\TDPEMonogame\TDPEMonogame\Content\Content.mgcb" /platform:Windows /outputDir:"D:/monogame_projects/tdpe/TDPEMonogame/TDPEMonogame/Content/bin/Windows/Content" /intermediateDir:"D:/monogame_projects/tdpe/TDPEMonogame/TDPEMonogame/Content/obj/Windows/net6.0-windows/Content" /workingDir:"D:/monogame_projects/tdpe/TDPEMonogame/TDPEMonogame/Content/"" exited with code 1. TDPEMonogame C:\Users\yunus\.nuget\packages\monogame.content.builder.task\3.8.1.303\build\MonoGame.Content.Builder.Task.targets 142
Generally, any conditional statement inside a shader makes me get the same error. Is branching not supported? I dont understand much from the error.