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

Expose field values as outputs #499

Closed
t3kt opened this issue May 13, 2021 · 2 comments
Closed

Expose field values as outputs #499

t3kt opened this issue May 13, 2021 · 2 comments
Labels
Milestone

Comments

@t3kt
Copy link
Owner

t3kt commented May 13, 2021

It would be useful for post-processing to be able get an output buffer that has the results of a field evaluated at the surface hit point (if any) for each pixel.
Could use it for things like fields that sweep through space

@t3kt
Copy link
Owner Author

t3kt commented Jun 28, 2021

Maybe have an exposeValue operator, which runs its input op and stores a copy of the result in either:

  • its own global variable, and shaderBuilder generates code to copy from those variables into output buffers.
  • or the op could just write directly to the output buffer.

It will be important to include render stage filtering, since values coming from the primary ray cast could be overwritten by things like shadow ray casts.

Could also be useful to have the ability to have it only store the result from an SDF input if the result represents a surface hit. Though perhaps that would end up being effectively done anyway since that would be the last step of the ray.

@t3kt
Copy link
Owner Author

t3kt commented Jun 28, 2021

Need to either support arbitrary output buffers added by ops, or add a fixed set of them which ops can choose from (customOut1, etc). Arbitrary buffers will involve a fair amount of changes to shaderBuilder infrastructure, so maybe avoid that.

t3kt added a commit that referenced this issue Jun 30, 2021
t3kt added a commit that referenced this issue Jul 3, 2021
t3kt added a commit that referenced this issue Jul 19, 2021
not yet working fully.

see #499
@t3kt t3kt added this to the 0.20 milestone Dec 29, 2021
@t3kt t3kt closed this as completed in dc84da3 Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant