26
2016
Unlit Fake Curved World Shader
Tried to get world position from depth texture, but it didn’t work.. then founded COMPUTE_DEPTH_01 instead,
makes nice curve effect when applied to meshes (pushing the y vertices down based on depth).. although breaks a bit depending on camera rotation/position..
Shader source:
https://github.com/UnityCommunity/UnityLibrary/blob/master/Shaders/Vertex/UnlitFakeCurved.shader
without curve-shader:
But if you are looking for nicer curve effect, here’s one:
https://alastaira.wordpress.com/2013/10/25/animal-crossing-curved-world-shader/
Related Posts
2 Comments + Add Comment
Leave a comment
Recent posts
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
Rather than grabbing depth, since you’re in the vertex shader anyway, couldn’t you just apply MV and P transformations separately, and then do your transformation while in view space? Unless you’ve scaled the camera transform, you should be at world scale in local camera space at that point.
Yes, wasn’t really useful effect the way i left it..and would look nicer if do real curve, instead of just pushing on Y..