Skip to content

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

URP-VHS-Retro-Effects

Based On Unity 2022.3

URP.VHS.Retro.Effects.mp4

Features

  • Color Bleed
  • Smear
  • Edge Sharpening
  • Tape Noises
  • Interlacing
  • Scanlines
  • Film Grain

Please visit URP中实现 VHS Retro Effect | My Blogs to get more details

实现的过程中遇到了一些坑

  • 使用到了dual blur,用int数组,也就是RenderTextureIdentifier的形式来保存dual blur中的多个临时纹理。如果使用Blitter.BlitterTexture将cameraColor拷贝到第一个RenderTextureIdentifier,源纹理出现了货不对版的情况,在FrameDebugg中查看,源纹理变成了深度纹理,或SSAO中的纹理,很奇怪。使用cmd.Blit就没有问题

  • dual blur过程中所使用的临时纹理,貌似需要使用R8G8B8A8_SRGB的格式

    • 分配临时纹理,如果使用的是cmd.GetTemporaryRT(_XXTexture, width, height, 0, FilterMode.Bilinear);,会得到R8G8B8A8_SRGB格式的纹理,并且blur效果正确

    • 而如果使用cmd.GetTemporayRT(_XXTexture, descriptor),虽然可以指定descriptor的graphcisFormat为R8G8B8A8_SRGB,但最终得到的blur效果会呈现一些网格状:

  • RGB与YCbCr的正确的相互转换建立在RGB位于Gamma空间的前提下

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages