{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreic75zienldv2ouenwcabv2lrwq5ljjj6vzx5pthgb4cbbx22yrbdq",
"uri": "at://did:plc:dxjzgxe7cvirxkwfjr2tjspt/app.bsky.feed.post/3mfdfualjct42"
},
"path": "/t/cartoonedgefilter-makes-the-entire-background-black/49419#post_6",
"publishedAt": "2026-02-20T17:38:52.000Z",
"site": "https://hub.jmonkeyengine.org",
"textContent": "I have a working solution now, at the end of the shader I did this:\n\n\n float alpha=fetchTextureSample(m_DepthTexture, texCoord, 0).r;\n if (alpha>.99f ) alpha=edgeAmount;\n else alpha=1;\n\n gl_FragColor = vec4( color, alpha);\n\n\nWhat it does, is reading the depth and if that is beyond a certain treshold, then I cut it of. Otherwise I set it to 1. When cutting of, I use the calculated edge value to smoothen the cutoff.\n\nI don’t like this solution, I can not stand that the color buffer has no transparancy. I just don’t understand where that went wrong.",
"title": "CartoonEdgeFilter makes the entire background black"
}