playdeadgames / temporal

Temporal Reprojection Anti-Aliasing for Unity 5.0+
MIT License
1.84k stars 192 forks source link

Error on running demo scene #1

Closed bateramos closed 7 years ago

bateramos commented 8 years ago

Hello, thanks for sharing this awesome library! I'm trying to run the scene that was shared with this project on a empty Unity3d project and I get this error: Trying to access pass 1, but material 'Playdead/Post/VelocityBuffer' subshader (0) has only 1 valid passes. UnityEngine.Material:SetPass(Int32) VelocityBuffer:OnPostRender() (at Assets/Scripts/VelocityBuffer.cs:126)

my unity3d version is 5.3.0f4 and I'm running on a MacOS.

AndreasNull commented 8 years ago

Same problem here: Mac OS X Yosemite v10.10.5 with Unity 5.3.4f1

screen shot 2016-03-23 at 1 27 26 pm

fuglsang commented 8 years ago

Thanks for reporting! Will take a look once I'm back from post-GDC vacation.

robsolomon commented 8 years ago

After a little digging, the OSX issue is due to this change Unity made in 5.3.X:

http://forum.unity3d.com/threads/opengl-core-backend-default-change-for-osx-and-linux.359225/

A typical issue you may encounter is when you use #pragma only_renderers gles opengl in your shaders. We will probably need to add glcore.

Modifying instances of this line (in both .shader files) from #pragma only_renderers ps4 xboxone d3d11 d3d9 xbox360 opengl to #pragma only_renderers ps4 xboxone d3d11 d3d9 xbox360 opengl glcore removes the error.

Thanks for this resource!

AndreasNull commented 8 years ago

@robsolomon solution works for me! Thanx!