Search Unity

border color of rendertexture in postprocess of HDRP

Discussion in 'Image Effects' started by Deleted User, Jan 29, 2020.

  1. Deleted User

    Deleted User

    Guest

    1.png
    Hi,

    I am making a custom postprocess in HDRP. I am confused when I sample a texture with a uv less than 0 or greater than 1, I will get a black color.
    I 'd like to know what's the wrapmode of rendertexture in the RTHandle. And Why I got a black color.

    Code (CSharp):
    1. // I add a offset value to uv.x to simulate a glitch effect. It makes the uv.x at the border of rendertexture maybe less than 0 or greater than 1
    2. float4 c = LOAD_TEXTURE2D_X(_InputTexture, float2(uv.x + noise * 0.05, uv.y) * _ScreenSize.xy)
    Thanks.
     
  2. yyysukiii

    yyysukiii

    Joined:
    Jun 13, 2020
    Posts:
    9
    hello,how did u due with it?