Hello, i have an idea if is posible to discard pixels without changing original materials to make cross-section effect on object that was imported during runtime.
I think i can do it with multiple material submesh, but it look like i can discard only pixels added with cross-section shader and it not affect pixels that are rendered with other shaders… Or is it posible to control it from c# script?
Not possible. A shader discard works by just not writing anything to the frame buffer. It can’t remove something that’s already been rendered or prevent something after from rendering.
If you want something that doesn’t require using a different material you would have to modify the mesh from c# to actually remove and split the polygons you want to hide.