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

Commit b163712

Browse files
authored
Resolve warning in MotionBlur shader
When I compiled the shaders the MotionBlur shader issued the following warning: ``` 'Hidden/Post FX/Motion Blur': variable 'o' used without having been completely initialized at Assets/PostProcessing/Resources/Shaders/MotionBlur.cginc(391) (on d3d9) ``` After reviewing this I discovered that the uvSPR member of the instantiated VaryingsDefault struct was not initialized; causing this error to occur. By initializing this member to 0 it provides a valid initial value and as such will resolve the aforementioned warning.
1 parent 8afc17a commit b163712

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

PostProcessing/Resources/Shaders/MotionBlur.cginc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ VaryingsDefault VertFrameCompress(AttributesDefault v)
383383
{
384384
VaryingsDefault o;
385385
o.pos = v.vertex * float4(2.0, 2.0, 0.0, 0.0) + float4(0.0, 0.0, 0.0, 1.0);
386+
o.uvSPR = 0;
386387
#if UNITY_UV_STARTS_AT_TOP
387388
o.uv = v.texcoord * float2(1.0, -1.0) + float2(0.0, 1.0);
388389
#else

0 commit comments

Comments
 (0)