{"action":"created","issue":{"url":"https://api.github.com/repos/candycat1992/Unity_Shaders_Book/issues/51","repository_url":"https://api.github.com/repos/candycat1992/Unity_Shaders_Book","labels_url":"https://api.github.com/repos/candycat1992/Unity_Shaders_Book/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/candycat1992/Unity_Shaders_Book/issues/51/comments","events_url":"https://api.github.com/repos/candycat1992/Unity_Shaders_Book/issues/51/events","html_url":"https://github.com/candycat1992/Unity_Shaders_Book/issues/51","id":179960721,"number":51,"title":"关于12章运动模糊问题","user":{"login":"vipshenji","id":22514606,"avatar_url":"https://avatars.githubusercontent.com/u/22514606?v=3","gravatar_id":"","url":"https://api.github.com/users/vipshenji","html_url":"https://github.com/vipshenji","followers_url":"https://api.github.com/users/vipshenji/followers","following_url":"https://api.github.com/users/vipshenji/following{/other_user}","gists_url":"https://api.github.com/users/vipshenji/gists{/gist_id}","starred_url":"https://api.github.com/users/vipshenji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipshenji/subscriptions","organizations_url":"https://api.github.com/users/vipshenji/orgs","repos_url":"https://api.github.com/users/vipshenji/repos","events_url":"https://api.github.com/users/vipshenji/events{/privacy}","received_events_url":"https://api.github.com/users/vipshenji/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-29T06:09:39Z","updated_at":"2016-10-11T12:50:11Z","closed_at":null,"body":"作者 您好\r\n想请问下关于书中第12章屏幕后处理效果之运动模糊中我的两个个疑问 \r\n\r\n我理解您的思路应该是当前帧和前一帧数据做一个accumulation。用到了两个Pass。\r\n\r\n第一个问题：\r\n       您用到accumulationTexture.MarkRestoreExpected()这样一个函数，网上搜的内容也比较少，看你的解释是不让unity把上一帧（accumulationTexture）的信息删除掉。但是 Graphics.Blit(src, accumulationTexture, material)这句就是记录了上一帧accumulationTexture的值 代码里也没有清空accumulationTexture值得操作。所以本来值应该就是一直保存的啊\r\n\r\n主要就是第二个问题：\r\n第一个pass是做Alpha Blend。 ColorMask RGB 只写入rgb数据到颜色缓冲区。那这时候的颜色缓冲区的A值还是上一帧的A值（也就是目标缓冲区里的A值 ，是不是1？）让我理解应该就到此为止就行了。但是您又进行了第二个Pass。书中说是为了确保写入的是1。但是我自以为好像没有必要，做了很多实验。甚至我极端的把第二个Pass 写入的a值设置为0。运行起来感觉也没有什么变化。\r\n\r\n能否请解答下 我理解的第一个pass思路是不是正确的，还有就是第二个pass存在的必要性（一定是有作用的，强大的作者肯定有自己的道理）。"},"comment":{"url":"https://api.github.com/repos/candycat1992/Unity_Shaders_Book/issues/comments/252907276","html_url":"https://github.com/candycat1992/Unity_Shaders_Book/issues/51#issuecomment-252907276","issue_url":"https://api.github.com/repos/candycat1992/Unity_Shaders_Book/issues/51","id":252907276,"user":{"login":"candycat1992","id":5907064,"avatar_url":"https://avatars.githubusercontent.com/u/5907064?v=3","gravatar_id":"","url":"https://api.github.com/users/candycat1992","html_url":"https://github.com/candycat1992","followers_url":"https://api.github.com/users/candycat1992/followers","following_url":"https://api.github.com/users/candycat1992/following{/other_user}","gists_url":"https://api.github.com/users/candycat1992/gists{/gist_id}","starred_url":"https://api.github.com/users/candycat1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candycat1992/subscriptions","organizations_url":"https://api.github.com/users/candycat1992/orgs","repos_url":"https://api.github.com/users/candycat1992/repos","events_url":"https://api.github.com/users/candycat1992/events{/privacy}","received_events_url":"https://api.github.com/users/candycat1992/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T12:50:11Z","updated_at":"2016-10-11T12:50:11Z","body":"额并不是，每一帧开始之前是会Clear当前帧缓存的，因此_MainTex每一帧都会重新绘制，不会保留上一次的结果。会被保留的是accumulationTexture：\r\n`Graphics.Blit (src, accumulationTexture, material);`\r\n"}}
{"actor":{"display_login":"candycat1992"}}