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

Updated render predicate docs #438

Merged
merged 2 commits into from
May 17, 2024
Merged

Updated render predicate docs #438

merged 2 commits into from
May 17, 2024

Conversation

britzl
Copy link
Contributor

@britzl britzl commented May 17, 2024

The render predicate example indicated that tags were included using OR when in fact the tags are combined using AND. Also, the max number of predicates is 64, not 32.

In your render script, you can then create a *render predicate* and specify which tags should belong to that predicate. When you tell the engine to draw the predicate, each object with a material containing a tag matching the list specified for the predicate will be drawn.
In your render script, you can then create a *render predicate* and specify which tags should belong to that predicate. When you tell the engine to draw the predicate, each object with a material containing all of the tags specified for the predicate will be drawn.

```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not have time to update the images. This is better than nothing.

@britzl britzl requested review from Jhonnyg and AGulev May 17, 2024 07:33
@@ -43,7 +43,7 @@ Samplers
: You can optionally configure specific samplers in the materials file. Add a sampler, name it according to the name used in the shader program and set the wrap and filter settings to your liking.

Tags
: The tags associated with the material. Tags are represented in the engine as a _bitmask_ that is used by [`render.predicate()`](/ref/render#render.predicate) to collect components that should be drawn together. See the [Render documentation](/manuals/render) on how to do that. The maximum number of tags you can use in a project is 32.
: The tags associated with the material. Tags are represented in the engine as a _bitmask_ that is used by [`render.predicate()`](/ref/render#render.predicate) to collect components that should be drawn together. See the [Render documentation](/manuals/render) on how to do that. The maximum number of tags you can use in a project is 64.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the internal array can store 64, we can’t use more than 32 material tags, so I’m not sure it helps increasing the number tbh. 32 material tags in a draw call seems a lot?

@britzl britzl merged commit 0f86a0f into master May 17, 2024
1 check passed
@britzl britzl deleted the fix-render-predicate-docs branch May 17, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants