You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When adding multiple Point lights to a scene with shadows on it will eventually throw warnings saying warning X3203: signed/unsigned mismatch, unsigned assumed
It seems like computing the lights sometimes removes the warnings but not consistently.
annoyingly I cant even share the project because it seems like at some point after rebuilding I cant create the problem anymore but it does sometimes come back when adding more lights.
To Reproduce
Steps to reproduce the behavior:
create a new empty scene
add 8 light probes in a box shape similar to the docs
add point lights until when running the game the above error appears (it was not consistent for me when it popped up)
Expected behavior
Lights should not throw warnings when light probes are being used.
It's a bit annoying how the lines don't match up with the log file (even after stripping the initial comments), though the character positions did match up (59-97).
In any case, I've found the issue in shader_StrideForwardShadingEffect_a0e5bf768ffbbe8f4fb2385c6bc54cb3.hlsl on line 634 (which is part of the PrepareEnvironmentLight method)
probeIndices is a uint4 but IgnoredProbeStart_id175 is an int so the comparison throws this warning (whenever you compare uint vs int with operators like greater/less than, it'll throw this warning).
I suspect the quick fix is just casting to uint, eg. uint(IgnoredProbeStart).
Sadly I'm not well versed in the HLSL to understand how or why the ternary operator works with uint4 in this manner, so don't know if line in its entirety is correct or not.
Update to the above research, while I don't think Stride uses HLSL 2021, according to the following link, the ternary operator will would be invalid microsoft/DirectXShaderCompiler#4070
Pinging @Jklawreszuk looking at the sub-link in the above link titled "Compilation problem on Linux: ternary error with non scalar" (I don't want to link it directly as it'll link back to this issue, lol).
Maybe this type of ternary operation one source of the "Error while compiling GLSL shader" error?
For me, the warning goes away when I remove the Light Probes. However, there's still considerable lag when the Point Lights have shadows enabled, rendering the game unplayable. Spot Lights seems unaffected.
Release Type: official
Version: 4.2.0.2232
Platform(s): Windows
Describe the bug
When adding multiple Point lights to a scene with shadows on it will eventually throw warnings saying
warning X3203: signed/unsigned mismatch, unsigned assumed
It seems like computing the lights sometimes removes the warnings but not consistently.
annoyingly I cant even share the project because it seems like at some point after rebuilding I cant create the problem anymore but it does sometimes come back when adding more lights.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Lights should not throw warnings when light probes are being used.
Screenshots
A view of the scene that used to throw the error:
Log and callstacks
the referenced files are here:
Shaderfiles.zip
Additional context
Linus in the Discord was the one who originally found the problem.
The text was updated successfully, but these errors were encountered: