Skip to content

test scriptable render pipeline & custom render pipeline

Notifications You must be signed in to change notification settings

huangx916/SRP-CRP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRP-CRP

test scriptable render pipeline & custom render pipeline

Note:

OnPostRender函数中调用Graphics.Blit没效果,可能是由于hdr开启的原因。 Every Graphics.Blit causes RenderTexture.ResolveAA if MSAA enabled which is killing framerate.

Unity使用的是OpenGL标准,即-1是左和下,1是右和上, 0是远裁面,1是近裁面

GBuffer中储存当前像素的Albedo, Specular, AO, normal, Depth等

struct UnityStandardData
{
    half3   diffuseColor;
    half    occlusion;

    half3   specularColor;
    half    smoothness;

    float3  normalWorld;        // normal in world space
};

通过深度图反推世界坐标就需要viewProjection matrix的逆矩阵:

float4 worldPos = mul(_InvVP, float4(i.uv*2-1, depth, 1)); 

About

test scriptable render pipeline & custom render pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published