Search Unity

Texture Streaming vs Decals

Discussion in 'General Graphics' started by fdsagizi2, Oct 18, 2018.

  1. fdsagizi2

    fdsagizi2

    Joined:
    Nov 4, 2013
    Posts:
    70
    Hi unity team! We now use Texture Streaming for our project - work really nice!

    But - how will be with Decals in Deffered Render? We draw decals with Command Buffer and don't have Mesh Render on the scene...

    As result all decal textures are blured.

    Now we fix it - make hook: add Mesh Render to scene, disable all stuff like Drop shadow, recive shadow, motion blur...

    and set this shader:

    Code (CSharp):
    1. Shader "Custom/Data/Decals/Empty_TextureStream"
    2. {
    3.     Properties
    4.     {
    5.          _BumpMap ("Normalmap", 2D) = "bump" {}
    6.          _Diffuse ("Diffuse", 2D) = "white" {}
    7.     }
    8.     SubShader
    9.     {
    10.         Pass
    11.         {
    12.             CGPROGRAM
    13.             #pragma vertex vert
    14.             #pragma fragment frag
    15.            
    16.             struct v2f
    17.             {
    18.                 float4 vertex : SV_POSITION;
    19.             };          
    20.             v2f vert (){
    21.                 v2f o;
    22.                 o.vertex = float4(0,-100000,0,0);
    23.                 return o;
    24.             }          
    25.             fixed4 frag (v2f i) : SV_Target
    26.             {
    27.                 return 0;
    28.             }
    29.             ENDCG
    30.         }
    31.     }
    32. }
     
  2. fdsagizi2

    fdsagizi2

    Joined:
    Nov 4, 2013
    Posts:
    70
  3. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
    I actually think this is still an issue in 2021.2!