shader: correctly apply defaults

This (should) fix shader building on intel gpus with mesa drivers.
`foutColor` was optimized out because the initial values appear to be always 0. Thus it was not building, because the uTintColor uniform was not found (and maybe it otherwise would have appeared black)
This commit is contained in:
Moritz Zwerger 2024-04-23 11:30:31 +02:00
parent 448a76e6e0
commit 5b1ca516e1
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
3 changed files with 6 additions and 3 deletions

View File

@ -23,7 +23,8 @@ uniform vec4 uTintColor;
void main() {
applyTexel();
applyDefaults();
foutColor *= uTintColor;
discard_alpha();
applyTexel();
}

View File

@ -23,6 +23,7 @@ uniform vec4 uTintColor;
#include "minosoft:animation"
void main() {
applyDefaults();
foutColor.rgb *= uTintColor.rgb;
applyTexel();
foutColor *= uTintColor;
}

View File

@ -24,6 +24,7 @@ uniform vec4 uTintColor;
#include "minosoft:animation"
void main() {
applyTexel();
applyDefaults();
foutColor *= uTintColor;
applyTexel();
}