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

Add colormap sampler #81

Closed
jeffamstutz opened this issue May 31, 2023 · 0 comments
Closed

Add colormap sampler #81

jeffamstutz opened this issue May 31, 2023 · 0 comments
Labels
v1.0 Issues to be decided on for the v1.0 specification

Comments

@jeffamstutz
Copy link
Contributor

jeffamstutz commented May 31, 2023

VisRTX currently implements a colormap sampler subtype which as proven to be useful in scivis applications (specifically VTK-m). It essentially applies the same value color mapping operation that the transferFunction1D does to volume data but instead on geometry attributes.

This issue proposes the following sampler extension text be added to the spec (roughly speaking, wording to be improved):

The KHR_SAMPLER_COLOR_MAP extension indicates that an additional sampler subtype is available:
"colorMap". This sampler takes the first channel of the input attribute and
applies a transfer function (normalization + color) to it. This sampler has the
following parameters in addition to the base ANARI sampler parameters:

Name Type Default Description
color ARRAY1D of Color array to map sampled and clamped field values to color
valueRange FLOAT32_BOX1 [0,1] input attribute values are clamped to this range

This sampler follows the same rules for the color parameter as they are found on the "transferFunction1D" volume subtype. Values from this sampler are output as VEC3(r, g, b, 1) to the input of the material where the sampler used, where r, g, and b come from the values in color respectively.

@jeffamstutz jeffamstutz added the v1.0 Issues to be decided on for the v1.0 specification label May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.0 Issues to be decided on for the v1.0 specification
Projects
None yet
Development

No branches or pull requests

1 participant