CS_BeatSaber_Camera2
CS_BeatSaber_Camera2 copied to clipboard
Change the maximum opacity value of Transparency
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.
The right side shows this clamp replaced with a shader that has been changed to 1.0 https://github.com/kinsi55/CS_BeatSaber_Camera2/blob/aa93200cd4553254958fe8202dc39d7ae65f0ca4/Shaders/LuminanceKey.shader#L55
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
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.
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?
Transparency remains the same whether depth texture is enabled or disabled.
The left side is enabled and the right side is disabled.
I suppose the Shaders on your Avatar do not write to the Depthbuffer then. Alright I'll just change the clamp value.
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.
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.
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.