exerion wrote:Hi Ricardo =D
We got it all working thanks to your help. For those who want to do something similar this is how we did it. Note it technically doesn't curve the world around it just lowers the verts at an increasing amount the greater the distance from the CurveSphereTip vector3.
We have made a Amplify Shader Function. I would attach the shader function asset file but it's not permitted. You could make the CurveSphereTip vector3(defines the curve origin) and the CurveMultiplier float(defines how much curve) parameters global so you can control the curve globally rather than having to set it on each material. You can see how this is done in the great link Ricardo posted -
http://grrava.blogspot.com.au/2015/05/bending-world-with-unity.htmlFunction.png
Add the shader function to your shader (you may have to restart ASE before you can add it). Set Vertex Output to Absolute.
Abolute.png
If you didn't make the CurveSphereTip and CurveMultiplier global you can adjust the settings on a material that is using your shader. This is what you can expect to see.
ShaderSettings.png
Ricardo, we're not sure how to globally disable and enable the effect. We tried to enable/disable the Keyword using Shader.EnableKeyword/DisableKeyword but the checkbox in the material inspector seems to override whatever we do.
When we're ready to reveal our game we'll post some screenshots =D
That's awesome, happy to know that you got it working with ASE. Great job!
We accept
user submissions if you are interested, fully credited.
That's the current expected behavior for the Static Switch node, enabling the Material Property will override disabling it via code. There's an alternative but, unfortunately, we found a small issue while testing it on our side. The Keyword Switch node applies any changes to all shaders but it's missing a key piece of code in the current version, we are going to correct the problem and update ASE as soon as possible.
If you wan't to try it out before the official fix, be sure to manually add
multi_compile under the Additional Pragmas parameters in your main shader options(Output Node).
Please note that when using the Keyword Switch node, you will have to reference the Material that's using the shader( e.g. mat.EnableKeyword() ).
Our apologies for the inconvenience. Thank you for your valuable feedback!