Please add a way to disable ztest, so elements such as crosshairs could be rendered on top of everything else

  • updated
  • Completed

I'm trying to create an animated 3d crosshair that is parented to the weapon and moves in 3d space. It needs to be rendered on top of other geometry and currently there is no proper way to do it.

I was able to edit the shader, but since there is no way to assign materials per shape instance, the change affected all instances.

Thanks!

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Pinned replies
Freya Holmér
  • Answer
  • Completed

this has now been implemented in the upcoming version!

Freya Holmér
  • Planned

I'd really like to add this! I think it does have some implications though in terms of implementation, especially if I want to be backwards compatible, because right now all depth test and blend mode parameters are directly controlled by the one blend mode setting. I feel like if I add a way to disable ztest I might also want to have ways of letting people customize zwrite and explicitly set blend modes to whatever values they want

Dmitri Kurteanu

Thanks for the reply! That makes sense.

Not sure how hard will this be to implement, but maybe add some kind of "advanced" editor mode, which would replace the blend mode setting in the inspector with separate controls for blend, ztest and zwrite?

Freya Holmér

yep, it's solvable, it's mostly a matter of figuring out the best way to serialize the data, and then also how to handle it in immediate mode too in terms of API and interfacing

Freya Holmér
  • Answer
  • Completed

this has now been implemented in the upcoming version!

Dmitri Kurteanu

This is awesome!

Thanks a lot!