Turbulence-Library icon indicating copy to clipboard operation
Turbulence-Library copied to clipboard

Transparency problem on Mac

Open owenroberts opened this issue 9 years ago • 3 comments

Hi there, love the turbulence library, I've been playing around with a bunch since I discovered it. Wanted to mention that I wasn't able to get the Transparent part of the Shader to work until I changed this line:

pragma surface surf Lambert vertex:vert

to

pragma surface surf Lambert vertex:vert alpha:fade

I don't really know why this worked, I don't write shaders, but I googled around and tried random things and that worked. The shader I was working on was a 3D, Simplex, Normal with Transparent, Animated and Colored.

Thanks

owenroberts avatar Oct 02 '16 09:10 owenroberts

Not just on the Mac. I was getting no joy with transparency on Windows (Unity 5.4). The fix above worked a treat!

theearlofsandwich avatar Dec 15 '16 10:12 theearlofsandwich

This fix worked, but it makes all the shaders have alpha:fade. I fixed it to only add the extra code if transparency is on. In NoiseCreator.cs:

if (toggles3D4D [1]) { shaderTags = NoiseStrings3D.TagsTransparent; shaderBlending = NoiseStrings3D.BlendingAlpha; shaderAlpha = NoiseStrings3D.AlphaOn; shaderProperties += NoiseStrings3D.PropertiesTransparency; shaderUniforms += NoiseStrings3D.UniformsTransparency; shaderLighting += " alpha:fade"; } else { shaderAlpha = NoiseStrings3D.AlphaOff; }

bryanrtboy avatar Mar 07 '17 17:03 bryanrtboy

Looking back at this project, I realize there are a lot of absurd things going on. Will merge your PR soon. I just need to update some things for better compatibility and quality first.

jesta88 avatar Mar 07 '17 18:03 jesta88