Interface IRasterRenderGraphBuilder
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public interface IRasterRenderGraphBuilder : IBaseRenderGraphBuilder, IDisposable
Methods
Name |
Description |
SetRenderFunc<PassData>(BaseRenderFunc<PassData, RasterGraphContext>)
|
Specify the render function to use for this pass.
A call to this is mandatory for the pass to be valid.
|
UseTextureFragment(TextureHandle, int, AccessFlags)
|
Use the texture as an rendertarget/renderpass attachment.
Writing:
Indicate this pass will write a texture on the current fragment position and sample index through MRT writes.
The graph will automatically bind the texture as an MRT output on the indicated index slot.
Write in shader as float4 out : SV_Target{index} = value; This texture always needs to be written as an
render target (SV_Targetx) writing using other methods (like operator[] = ) may not work even if
using the current fragment+sampleIdx pos. When using operator[] please use the WriteTexture function instead.
Reading:
Indicates this pass will read a texture on the current fragment position. If the texture is msaa then the sample index to read
may be chosen by the shader. This informs the graph that any shaders in pass will only read from this
texture at the current fragment position using the LOAD_FRAMEBUFFER_INPUT(idx)/LOAD_FRAMEBUFFER_INPUT_MS(idx,sampleIdx) macros.
I.e this texture is bound as an render pass attachment on compatible hardware (or as a regular texture
as a fall back).
The index passed to LOAD_FRAMEBUFFER_INPUT needs to match the index passed to ReadTextureFragment for this texture.
|
UseTextureFragmentDepth(TextureHandle, AccessFlags)
|
Use the texture as a depth buffer for the Z-Buffer hardware. Note you can only test-against and write-to a single depth texture in a pass.
If you want to write depth to more than one texture you will need to register the second texture as WriteTextureFragment and manually calculate
and write the depth value in the shader.
Calling UseTextureFragmentDepth twice on the same builder is an error.
Write:
Indicate a texture will be written with the current fragment depth by the ROPs (but not for depth reading (i.e. z-test == always)).
Read:
Indicate a texture will be used as an input for the depth testing unit.
|
Extension Methods
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.