Merge pull request #92774 from TokageItLab/fix-reverse-z-skeleton-gizmo

Fix Shader for SkeletonGizmo to follow renderer's reversed-z change
This commit is contained in:
Rémi Verschelde 2024-06-07 23:30:12 +02:00
commit 54e09c31ad
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -922,7 +922,7 @@ void vertex() {
VERTEX = VERTEX;
POSITION = PROJECTION_MATRIX * VIEW_MATRIX * MODEL_MATRIX * vec4(VERTEX.xyz, 1.0);
POSITION.z = mix(POSITION.z, 0.0, 0.999);
POSITION.z = mix(POSITION.z, POSITION.w, 0.999);
POINT_SIZE = point_size;
}
@ -1201,7 +1201,7 @@ void vertex() {
}
VERTEX = VERTEX;
POSITION = PROJECTION_MATRIX * VIEW_MATRIX * MODEL_MATRIX * vec4(VERTEX.xyz, 1.0);
POSITION.z = mix(POSITION.z, 0, 0.998);
POSITION.z = mix(POSITION.z, POSITION.w, 0.998);
}
void fragment() {
ALBEDO = COLOR.rgb;