-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Closed
Labels
Milestone
Description
Description
Migrated from the forum.
Looks like TSL can output duplicate statements in some case(s).
Reproduction steps
- open the linked fiddle
- uncomment either of the
.debuglines - run the fiddle
Code
I wrote this TSL,
If(diffuseColor.a.mul(alphaFactor).lessThanEqual(0.1337), () => Discard())and I noticed the output has duplicate discard statements:
if ( ( ( DiffuseColor.w * nodeVar1 ) <= 0.1337 ) ) {
discard;
discard;
}However if I write this TSL,
diffuseColor.a.mul(alphaFactor).lessThanEqual(0.1337).discard()then the output is fine:
if ( ( ( DiffuseColor.w * nodeVar1 ) <= 0.1337 ) ) {
discard;
}This example happens to be harmless. Might be worth checking to ensure other less-harmless statements are not duplicated (if they were, maybe someone would have errors already).
Live example
Screenshots
No response
Version
r182
Device
No response
Browser
No response
OS
No response