three.js
three.js copied to clipboard
Nodes: RenderOutputNode name change
Description
RenderOutputNode converts scene-referred linear light values to display-referred code values, and then converts the code value to a color space appropriate for the display.
The current name is derived from OutputPass, but I think we can do better.
Solution
I suggest the following nomenclature changes:
RenderOutputNode=>DisplayNode,DisplayViewNode, orViewNode- export const
renderOutput=>display,displayView, orview
Given that the transforms in this node are specific to a display, it seems reasonable to include Display in the name.
A "view", I believe, can include additional post-processing. That may be appropriate if the node were to include other optional transforms at some point.
//
For clarity, this is the current nomenclature:
scenePass.setMRT( mrt( {
output: output,
...
} ) );
const outputPass = scenePass.getTextureNode( 'output' );
postProcessing.outputNode = outputPass.renderOutput();
I recommend this nomenclature:
scenePass.setMRT( mrt( {
output: output,
...
} ) );
const outputPass = scenePass.getTextureNode( 'output' );
const viewPass = outputPass.displayView();
postProcessing.outputNode = viewPass;
Alternatives
None.
Additional context
No response
TBH, I find the output nomenclature appropriate.
If you want to change to display, you have to do this uniformly at least for the WebGPURenderer related code. So for example Renderer.outputColorSpace should be Renderer.displayColorSpace.
But right now, I don't see enough arguments to go through all these name changes.
I'm not opposed to a change, but I'm having trouble convincing myself of the improvement.
Perhaps worth noting, the closest term in WebGL would be gl.drawingBufferColorSpace, and in WebGPU that's GPUCanvasConfiguration#colorSpace. In neither case is it necessarily representative of the display or view. The browser or OS may apply additional mappings, or the application may intend to do something else with the canvas. So I'm nervous of committing to display/view terminology in these lower-level APIs. In an application like the three.js Editor, the terms "Display" or "View" would seem entirely appropriate.
Closing since the display or view notation did not get enough support. Let's stick to the current nomenclature for now.