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

Resolve warning in MotionBlur shader #4

Merged
merged 1 commit into from
Oct 14, 2016

Conversation

mvriel
Copy link
Contributor

@mvriel mvriel commented Oct 14, 2016

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.

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.
@Chman Chman merged commit a89bbb0 into Unity-Technologies:master Oct 14, 2016
@Chman
Copy link
Contributor

Chman commented Oct 14, 2016

👍

@mvriel mvriel deleted the patch-1 branch October 14, 2016 11:11
Chman pushed a commit that referenced this pull request Feb 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants