{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreicbaxuoiilwcf4p7e3kgjjvlhpasy2ausjxlcveiyywqaj5kl4lpa",
"uri": "at://did:plc:dxjzgxe7cvirxkwfjr2tjspt/app.bsky.feed.post/3mfd4budk5qo2"
},
"path": "/t/cartoonedgefilter-makes-the-entire-background-black/49419#post_3",
"publishedAt": "2026-02-20T15:16:13.000Z",
"site": "https://hub.jmonkeyengine.org",
"textContent": "I forked it, but preserving the alpha does not work. It seems to be 1.0 already.\n\nHere is how I tested that:\n\nAt the start of the main routine of the shader I did this:\n\n\n vec4 orig = getColor(m_Texture, texCoord);\n vec3 color = orig.rgb;\n\n\nSo now orig.a is alpha. Then the shader does some magic with the color vec and at the end I do this:\n\n` gl_FragColor = vec4( orig.a, color.g , color.b, 0.5);`\n\nThe image below is the result: and as you can see, red is always there. So it is save to say orig.a - the original alpha - is always 1.0f\n\n\n\nAnd to be complete: i did set the background to be transparent:\n\n\n ViewPort offView = renderManager.createPreView(\"OffscreenView\", cam.clone());\n offView.setClearFlags(false, true, true);\n offView.setBackgroundColor(new ColorRGBA(0, 0, 0, 0)); // Transparant!\n\n\nSo, why does it give me alpha is 1.0?",
"title": "CartoonEdgeFilter makes the entire background black"
}