mirror of
https://github.com/molstar/molstar.git
synced 2026-06-04 21:34:23 +08:00
fix transparent SSAO for image rendering
This commit is contained in:
@@ -14,6 +14,7 @@ Note that since we don't clearly distinguish between a public and private interf
|
||||
- Add more structure-based visuals to avoid too many (small) render-objects
|
||||
- `structure-intra-bond`, `structure-ellipsoid-mesh`, `structure-element-point`, `structure-element-cross`
|
||||
- Fix occupancy check using wrong index for inter-unit bond computation (@rxht, #1321)
|
||||
- Fix transparent SSAO for image rendering, e.g., volumne slices (#1332)
|
||||
|
||||
## [v4.8.0] - 2024-10-27
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ void main() {
|
||||
gl_FragColor = vec4(packIntToRGB(float(uObjectId)), 1.0);
|
||||
gl_FragData[1] = vec4(packIntToRGB(vInstance), 1.0);
|
||||
gl_FragData[2] = vec4(texture2D(tGroupTex, vUv).rgb, 1.0);
|
||||
gl_FragData[3] = packDepthToRGBA(gl_FragCoord.z);
|
||||
gl_FragData[3] = packDepthToRGBA(fragmentDepth);
|
||||
#else
|
||||
gl_FragColor = vColor;
|
||||
if (uPickType == 1) {
|
||||
@@ -135,7 +135,11 @@ void main() {
|
||||
#elif defined(dRenderVariant_depth)
|
||||
if (imageData.a < 0.05)
|
||||
discard;
|
||||
gl_FragColor = packDepthToRGBA(gl_FragCoord.z);
|
||||
if (uRenderMask == MaskOpaque) {
|
||||
gl_FragColor = packDepthToRGBA(fragmentDepth);
|
||||
} else if (uRenderMask == MaskTransparent) {
|
||||
gl_FragColor = packDepthWithAlphaToRGBA(fragmentDepth, imageData.a);
|
||||
}
|
||||
#elif defined(dRenderVariant_marking)
|
||||
float marker = uMarker;
|
||||
if (uMarker == -1.0) {
|
||||
@@ -146,7 +150,7 @@ void main() {
|
||||
if (uMarkingType == 1) {
|
||||
if (marker > 0.0 || imageData.a < 0.05)
|
||||
discard;
|
||||
gl_FragColor = packDepthToRGBA(gl_FragCoord.z);
|
||||
gl_FragColor = packDepthToRGBA(fragmentDepth);
|
||||
} else {
|
||||
if (marker == 0.0 || imageData.a < 0.05)
|
||||
discard;
|
||||
|
||||
Reference in New Issue
Block a user