Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the maximum opacity value of Transparency #98

Open
rynan4818 opened this issue Mar 5, 2023 · 8 comments
Open

Change the maximum opacity value of Transparency #98

rynan4818 opened this issue Mar 5, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@rynan4818
Copy link

Even if I set the 'Transparency Threshold' of 'EFFECTS' to the minimum (0.5), the maximum alpha value is clamped at 0.9.
I would like to be able to change the clamp value.

The reason is that we want to display the avatar as an overlay, but it is a bit transparent.

image

The right side shows this clamp replaced with a shader that has been changed to 1.0

col.a = clamp(pow(Luminance(col) * (80 - _Threshold), 2), 0, 0.9);

@rynan4818 rynan4818 added the enhancement New feature or request label Mar 5, 2023
@kinsi55
Copy link
Owner

kinsi55 commented Mar 8, 2023

Hm, I did have some reason before why I clipped it at 0.9... But I dont remember any more. I'll just change it to 1 with the next version

@rynan4818
Copy link
Author

I didn't see any reason to set it to 0.9 either, so if it's fine to set it to 1, that's fine.

@kinsi55
Copy link
Owner

kinsi55 commented Mar 9, 2023

Actually, I remembered why I do thave that in there. That statement is only relevant when you do not use the depth buffer - Have you enabled the depth texture for that camera?

@rynan4818
Copy link
Author

image
Transparency remains the same whether depth texture is enabled or disabled.
The left side is enabled and the right side is disabled.

@kinsi55
Copy link
Owner

kinsi55 commented Mar 9, 2023

I suppose the Shaders on your Avatar do not write to the Depthbuffer then. Alright I'll just change the clamp value.

@rynan4818
Copy link
Author

By the way, the avatar display mod we are using is Custom Avatars 5.3.0.

I am very grateful for this feature of Camera2, as it is essential for this kind of overlay display using Custom Avatars.

@kinsi55
Copy link
Owner

kinsi55 commented Mar 10, 2023

The problem here is with the specific model that you use not with the Avatar Mod - The Materials / Shaders do not write to the depth buffer, thus Cam2 doesnt properly know which pixels are supposed to be transparent or not, but yeah this issue shouldnt exist anymore when I change the clamp value.

@rynan4818
Copy link
Author

Okay, I understand.
I don't know if changing the clamp value has any impact or problem on the others, but I will leave it to you to decide on the modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants