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
I'm creating this issue in this project since i can't manage to get if it's an S&box Scene issue or a simple logical issue.
For my FPS Project, i have recently implemented the sbox-gunfight v2 ViewModel logic :
a main camera for displaying the scene
a secondary camera for displaying only the weapon ViewModel
By manipulating Render Tags / Render Exclude Tags for CameraComponent. And also, by manipulating Tags for Lights components & ViewModels, i obtain the desired result: a ViewModel that does not pass through facing walls.
Also inspired by the sbox-gunfight project, the Clear Flags of the secondary camera must be set to ClearFlags.Depth.
But let's discover 2 issues :
Firstly, if you have any Screen Panel, they will be hidden by the second camera cause of his ClearFlags
Secondly, setting ClearFlags toClearFlags.Depth only will create a spammy console error :
Error: View "Camera", Layer "Clear Color Depth Stencil", render target "output_depth_back_buffer....":
It is illegal for the first write to a non-scratch render target to not preserve, discard, or clear it!
(This can often happen if you forget to clear both depth and stencil)
at Sandbox.EngineLoop.Print(Int32 severity, String logger, String message)
at Managed.SandboxEngine.Exports.Sandbox_EngineLoop_Print(Int32 severitty, IntPtr logger, IntPtr message)
at Sandbox.EngineLoop.RunFrame(CMaterialSystem2AppSystemDict appDict, Boolean& wantsQuit)
at Sandbox.SourceEngineApp.RunFrame() in C:\build\_work\sbox\sbox\engine\Launcher\SourceEngineApp.cs:line 48
at Sandbox.SourceEngineApp.RunLoop() in C:\build\_work\sbox\sbox\engine\Launcher\SourceEngineApp.cs:line 39
at Sandbox.Program.LaunchGame() in C:\build\_work\sbox\sbox\engine\Launcher\Launcher.cs:line 93
at Sandbox.Program.Main() in C:\build\_work\sbox\sbox\engine\Launcher\Launcher.cs:line 58
To Reproduce
Download sbox-gunfight
Start gunfight.scene
Play: you will get the spammy console errors (the Secondly mentioned issue)
Stop. Now let's get the Firstly mentioned issue.
To a GameObject, add Screen Panel component
Then add a simple UI Razor Panel
Play: the UI panel will not appear
Edit the Secondary camera Clear Flags : add Color then remove it.
Constat the UI has started to appear correctly. This is the expected behavior.
Expected behavior
No error
Keep the UI
Media/Files
Here my reproduce step in video:
2023-12-18.19-35-18.mp4
The text was updated successfully, but these errors were encountered:
Describe the bug
Hello,
I'm creating this issue in this project since i can't manage to get if it's an S&box Scene issue or a simple logical issue.
For my FPS Project, i have recently implemented the
sbox-gunfight
v2 ViewModel logic :By manipulating
Render Tags
/Render Exclude Tags
for CameraComponent. And also, by manipulatingTags
for Lights components & ViewModels, i obtain the desired result: a ViewModel that does not pass through facing walls.Also inspired by the
sbox-gunfight
project, theClear Flags
of the secondary camera must be set toClearFlags.Depth
.But let's discover 2 issues :
Firstly, if you have any
Screen Panel
, they will be hidden by the second camera cause of hisClearFlags
Secondly, setting ClearFlags to
ClearFlags.Depth
only will create a spammy console error :To Reproduce
Download
sbox-gunfight
Start
gunfight.scene
Play: you will get the spammy console errors (the Secondly mentioned issue)
Stop. Now let's get the Firstly mentioned issue.
To a
GameObject
, addScreen Panel
componentThen add a simple UI Razor Panel
Play: the UI panel will not appear
Edit the Secondary camera
Clear Flags
: addColor
then remove it.Constat the UI has started to appear correctly. This is the expected behavior.
Expected behavior
Media/Files
Here my reproduce step in video:
2023-12-18.19-35-18.mp4
The text was updated successfully, but these errors were encountered: