Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 558d544

Browse files
committed
Removed useless computations in vertex shaders used for MRT blits
1 parent 384a151 commit 558d544

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

PostProcessing/Resources/Shaders/AmbientOcclusion.cginc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ half4 FragComposition(VaryingsMultitex i) : SV_Target
425425
VaryingsDefault VertCompositionGBuffer(AttributesDefault v)
426426
{
427427
VaryingsDefault o;
428-
o.pos = v.vertex * float4(2.0, 2.0, 0.0, 0.0) + float4(0.0, 0.0, 0.0, 1.0);
428+
o.pos = v.vertex;
429429
#if UNITY_UV_STARTS_AT_TOP
430430
o.uv = v.texcoord.xy * float2(1.0, -1.0) + float2(0.0, 1.0);
431431
#else

PostProcessing/Resources/Shaders/MotionBlur.cginc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ half4 FragReconstruction(VaryingsMultitex i) : SV_Target
382382
VaryingsDefault VertFrameCompress(AttributesDefault v)
383383
{
384384
VaryingsDefault o;
385-
o.pos = v.vertex * float4(2.0, 2.0, 0.0, 0.0) + float4(0.0, 0.0, 0.0, 1.0);
385+
o.pos = v.vertex;
386386
o.uvSPR = 0;
387387
#if UNITY_UV_STARTS_AT_TOP
388388
o.uv = v.texcoord * float2(1.0, -1.0) + float2(0.0, 1.0);

PostProcessing/Resources/Shaders/TAA.cginc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ float4 _BlitSourceTex_TexelSize;
395395
VaryingsDefault VertBlit(AttributesDefault v)
396396
{
397397
VaryingsDefault o;
398-
o.pos = v.vertex * float4(2.0, 2.0, 0.0, 0.0) + float4(0.0, 0.0, 0.0, 1.0);
398+
o.pos = v.vertex;
399399
#if UNITY_UV_STARTS_AT_TOP
400400
o.uv = v.texcoord * float2(1.0, -1.0) + float2(0.0, 1.0);
401401
#else

PostProcessing/Runtime/Utils/GraphicsUtils.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public static Mesh quad
2828

2929
var vertices = new[]
3030
{
31-
new Vector3(-0.5f, -0.5f, 0f),
32-
new Vector3(0.5f, 0.5f, 0f),
33-
new Vector3(0.5f, -0.5f, 0f),
34-
new Vector3(-0.5f, 0.5f, 0f)
31+
new Vector3(-1f, -1f, 0f),
32+
new Vector3( 1f, 1f, 0f),
33+
new Vector3( 1f, -1f, 0f),
34+
new Vector3(-1f, 1f, 0f)
3535
};
3636

3737
var uvs = new[]

0 commit comments

Comments
 (0)