trusktr
1
I have this piece of TSL:
If(diffuseColor.a.mul(alphaFactor).lessThanEqual(0.1337), () => Discard())
and in the output WGSL I see discard twice:
if ( ( ( DiffuseColor.w * nodeVar1 ) <= 0.1337 ) ) {
discard;
discard;
}
Am I doing something silly? Or is this a (probably harmless) bug?
trusktr
2
Ah, if I instead write this TSL,
diffuseColor.a.mul(alphaFactor).lessThanEqual(0.1337).discard()
then it no longer produces duplicates:
if ( ( ( DiffuseColor.w * nodeVar1 ) <= 0.1337 ) ) {
discard;
}
Mugen87
3
It might be worth to investigate why the first version produces a double discard statement. Please report this issue at GitHub.