Alter centre of polygon transparency sorting
Shader and rendering related question. I don't know the right keywords to find my answer anywhere online. I need guidance from a person.
So right, there is this classic issue with deciding what order sprites or transparency is to be rendered. And from what I can gather the general solution developers (including unity(?)) have settled on is to render transparent surfaces based on the polygon's centre's z distance from camera?
Which means when dragging a sprite out on to the scene... it's the distance of the centre point of that sprite which decides when it is rendered on top of another sprite or not?
My question is ultimately; can this z-rendering point not be positioned and decided manually in any way? The sprite's anchor point seems to certainly not be the deciding factor, that's just for transforms.
I've wanted to create a game akin to a popup book with sprites on a field and it would've been great to have sprites accurately sorted based on their distance from camera at their feet or the parent object's feet. But due to certain sprites being taller than others their centre are sometimes technically closer or further away than objects nearer the camera.
It feels generally hacky to rely on altering every sprite's "order in layer" each frame with outside script when the shaders are so close to already doing all the job?
Even if it would involve a fundamental-engine altering code I'm mostly curious to know how deeply integrated this centre-point standard is with shaders and if it's possible to change at any point or does it require something as ludicrous as hardware redesigns?
Your answer
![](https://koobas.hobune.stream/wayback/20220612205935im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Fragment shader shows alpha, surface shader doesn't 0 Answers
Problem with transparency of an object 0 Answers
Unity Displaying Transparent Meshes Wrong / 'Artifacts' ? 0 Answers
Cannot make transparent plane work in 2D game with several layers 1 Answer
How to swap textures, only within an objects confines? 0 Answers