Open tidyui opened 8 years ago
Ok, so half way there. I noticed that disabling anti-aliasing in quality settings makes it run properly in windowed mode. However fullscreen is still pitch black.
Also when building a Debug build and running in fullscreen I get an Debug.LogError that "A render texture attached to a camera has been released". I'm guessing the screen goes black as the light texture in SpriteLightKit-BlendImageEffect.shader
returns 0 causing the following calculation to return zero.
return _MultiplicativeFactor * main * lights;
Again, I haven't managed to find out why it's happening
Are you setting the MultiplicativeFactor to 0 for some reason? It should be greater than 0 and less than ~2 to function correctly.
On Mar 10, 2016, at 1:35 AM, Håkan Edling notifications@github.com wrote:
MultiplicativeFactor
At this point I've kept it at the default value of 1. I'm gonna add some more debug printouts from the shader and I'll get back to you with the results.
Not getting any smarter at this point. Still getting this error printout in full screen mode:
I added some additional debug printouts to see what's happening and noticed that the rendertexture is actually created twice during init. When moving the startup code from OnEnabled
to Start
it was only executed once, but the problem remained in full screen however.
That is very odd indeed. I have 2 Macs here and it works on both of them without issue.
Mike
On Mar 11, 2016, at 7:04 AM, Håkan Edling notifications@github.com wrote:
Not getting any smarter at this point. Still getting this error printout in full screen mode:
I added some additional debug printouts to see what's happening and noticed that the rendertexture is actually created twice during init. When moving the startup code from OnEnabled to Start it was only executed once, but the problem remained in full screen however.
— Reply to this email directly or view it on GitHub.
Weird, could you share a build somehow just to check if the error is related to my unity build?
Ha. I just updated to the latest Unity build and I am seeing the same thing but only on Mac. Looks like its time to open yet another bug report with Unity. Looks like there is some kind of render texture corruption going on. These releases are becoming like mine fields lately...
Well the it's just not me :) let know if you get any response from unity, I'll use the code as is at the moment!
Apparently OpenGL Core is buggy as all hell right now. I'm hearing people having issues with all kinds of stuff. Word on the street is the latest patch release fixed some of the issues but I don't install those dang patches. Too buggy for me.
Ok, so I got it working on the latest version of Unity by pulling the code out and reworking it a bit. There are some tweaks to it.
If you want I can try to pull my more generic changes out and try to incorporate them into your code and send you a pull request, otherwise I'm pretty sure you can get it working with the above information :)
Thanks again for you time & ideas on the issue!
I'm currently waiting on Unitys GL Core fixes. I'm afraid to touch anything RenderTexture related since it seems that there are lots of related bugs at the moment.
Any news on this? I haven't pulled since February-ish, but was curious if a resolution was found. I was also able to repro this on my Mac.
Everything seems to be working with Unity 5.4 since Unity got the GL fixes in. I tested on 3 Macs and they all seem to work with anti aliasing on or off through window resizes and full screen/windowed mode switches.
I forked the repo & included the latest version in my project. Everything runs fine on my Macbook Pro when starting it from the Unity Editor, however when I build it for Mac & run it the blending does not work properly and produces the following result in windowed mode:
Screenshot taken from the SpriteLightKitDemo/SpriteLightKitScene
In full screen mode it works even less. I have confirmed that the windows build is working properly though.
I'll try to see if I can find out what's causing the problem, however if you have any ideas it would be appriciated as I like the core concept & implementation of it!
Regards