turanszkij / WickedEngine

3D engine with modern graphics
https://wickedengine.net
Other
5.7k stars 603 forks source link

GetDepthStencil for path tracing #647

Closed Cop46 closed 1 year ago

Cop46 commented 1 year ago

I have tried to add this by myself but my skill is to low with API graphics programming... When you have the time if you can add this feature thas would be really helpfull. Thanks

turanszkij commented 1 year ago

Do you need stencil too, or just depth? Because implementing stencil for this will be much more complicated than depth.

Cop46 commented 1 year ago

This is for making a transparent layer of the 3d scene for render with background image.

turanszkij commented 1 year ago

Ok, well I'm not sure what you are exactly doing, but I think it makes sense to add stencil too to be usable same way as regular rendering.

Cop46 commented 1 year ago

If this is too complicated to develop, for now I can "tink" with the rasterizer rendering and pathtracing. I don't want to add more work than you already have.

turanszkij commented 1 year ago

No, maybe I can do this today.

Cop46 commented 1 year ago

This is really sympatical ! Thanks.

turanszkij commented 1 year ago

Ok, it works now. This also makes the selection outline work in the Editor when path tracing is used. But Vulkan has an issue with copying into depth stencil, so it will only work in DX12 for now.