--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks Omar. I've been using this super cheesy but mostly good enough solution:It basically just subtracts a fixed amount of the depth value. It works well when the polygons are facing the camera, but it's not great when the polygons are at an angle to the camera because it doesn't scale the depth adjustment with the Z slope the way polygonOffset does.Kevin
On Thu, Dec 6, 2018 at 3:12 AM Omar Shehata <omar.sam...@gmail.com> wrote:
Hey Kevin,--I pinged Dan to take a look at this since he's most familiar with log depth. Hopefully you'll get a response soon!
On Wednesday, November 21, 2018 at 6:11:02 PM UTC-5, Kevin Ring wrote:I meant to say Vector3DTilePolylines would have the same problem, not Vector3DTilePolygons.
On Thursday, November 22, 2018 at 10:08:41 AM UTC+11, Kevin Ring wrote:Hi,I'm rendering some outlined solids via glTF. The outlines are just separate line primitives. Of course, it looks bad due to Z-fighting:As a proof of concept, I hacked up Model.js to render the filled faces with a polygonOffset (0.75 / 1.0), and it looks great:But that screenshot above is with logarithmic depth disabled. When it's enabled, the fragment shader writes depth, overriding the effect of the polygonOffset, and we're back at the first screenshot above.Looking at other parts of the Cesium code that use polygonOffset, it seems like the Vector3DTilePolygons will have the same problem. Perhaps it was written before Cesium used logarithmic depth?In any case, I was wondering if you guys have already thought about how to combine polygonOffset with logarithmic depth. Presumably the fragment shader needs to apply the depth offset manually, but the code to mimic the fixed-function behavior isn't at all obvious to me, and the internet is surprisingly unhelpful.If I get this working reasonably well, my plan is to define a glTF extension for outline rendering in my fork. Happy to PR it upstream if it's something others might be interested in.Kevin
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesiu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.