RE-SS3D / SS3D

Space Station 3D, another remake of SS13, but with an extra D.
https://ss3d.space/
252 stars 139 forks source link

Make interaction use the shader based system for selection #1387

Open stilnat opened 9 months ago

stilnat commented 9 months ago

Summary

Examine is using at its core a shader based method to select items as opposed to the classic collider based method. This method is ideal both to examine and to perform any other kind of interactions really. We would like the examine object selection method to be integrated with the interaction system, which currently uses simple colliders.

Interaction controller will need some rework, as we don't want the server to simply apply the same method as client, it would mean recomputing every shaders on server for each client which is hell.

However, security should be taken into account too, at least a bit. Server needs to do some check before allowing clients to run interaction.

Docs

Some concerns were raised in a previous attempt, you can find them here : https://github.com/RE-SS3D/SS3D/pull/842

and here : https://github.com/RE-SS3D/SS3D/pull/839

Regarding performance, there might be some inspiration here : https://medium.com/@philippchristoph/pixel-perfect-selection-using-shaders-16070d3094d

Here's ryan doc on the examine system https://docs.google.com/document/d/1xTyRXzi1g7H3SOkw1wkrFFbMcDUA0VEE/edit

Goal

The PR solving this should check the following :