Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSL: Add Return Expression #28595

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

RenaudRohlinger
Copy link
Collaborator

Related issue: #27726

Description

Just like discard you might want to use the return; expression in your shader. Currently the TSL implementation is limited to returning values.

If( instanceIndex.greaterThanEqual( 100 ), () => {

	Return(); // or/and discard 

} );

This contribution is funded by Utsubo

@RenaudRohlinger RenaudRohlinger added this to the r166 milestone Jun 10, 2024
@RenaudRohlinger RenaudRohlinger added the TSL Three.js Shading Language label Jun 10, 2024
@sunag sunag merged commit ab34d2b into mrdoob:dev Jun 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TSL Three.js Shading Language
2 participants