xeokit-sdk icon indicating copy to clipboard operation
xeokit-sdk copied to clipboard

[PROPOSAL]: Cleaner edges also for non-logarithmic depth buffer

Open tmarti opened this issue 11 months ago • 2 comments

I did some tests and I think that after merging #1788 now edges are rendered in a much nicer way when log. depth buffer is enabled than when it is not!

@xeolabs, Would you be interested in introducing the gradient technique also when log. depth buffer is not enabled?

The main changes I see that would be needed and could impact performance is to propagate the Z value from the vertex shader into the fragment shader, and the calculation of dxf and dxdy from the fragment shader.

Other than this the change is conceptually very easy 🙂

tmarti avatar Jan 24 '25 08:01 tmarti

Hi Toni! Yes I think it would be good to use the gradient technique in non-log depth mode. The performance hit is OK, because users often use FastNavPlugin to hide edges while moving the viewpoint.

xeolabs avatar Jan 24 '25 10:01 xeolabs

@tmarti This would be a very nice improvment too and could be interesting regarding performance compared to the log. depth buffer. Do you already have a draft implementation of this which you can share?

pbbr avatar Mar 13 '25 19:03 pbbr