Add a "fatal" function for multi-output Map shaders

Open
#307 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
43/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
backend

Research direction

Start with lib/rendering/rndr/RenderContext.h and RenderContext.cc, then trace how fatalSampleBool is installed and how multi-output shaders receive their output buffer. The issue suggests zeroing the buffer or assigning type-appropriate error values, and asks whether error values can be cached. Done means a multi-output fatal function is installed through mSceneContext->setFatalSampleFuncMulti(); the issue does not name tests to run.

Written by the indexing model from the issue text.

Description

In moonray: lib/rendering/rndr/RenderContext.{h,cc} Add a "fatal" function analogous to fatalSampleBool for multi-output shaders (fatalSampleMulti?) and call mSceneContext->setFatalSampleFuncMulti() to set it on the context.

A trivial implementation of this would be to get the size of the output buffer and zero it while a more advanced one would iterate through the outputs and set an appropriate error value for each type. This may be awfully expensive though. Is there someplace we could cache an error value?

Dominant language
CMake
Stars
4.7k
Forks
321
Avg merge
13m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenMoonRay/openmoonray

All issues in OpenMoonRay/openmoonray

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.