9
2016
Shader Z-Fight Offset
(screenshot with Quad mesh placed on top of Plane with raycast hit.point) If you want to use Raycast hit.point to place quad on a flat surface, it will most likely create Z fighting issue.. You could add position offset by hit.point+Vector3(0,0.1f,0), Or use modified shader […]
4
2016
Shader error: cannot map expression to vertex shader instruction
Had a strange looking error today: Turns out it was just that the function which was called inside vertex shader, was below the vertex shader, so just moved it above the v2f vert (appdata v) and it works.. *Actually it was more complicated: This one […]
23
2016
Using RenderDoc with Unity (graphics debugger)
“RenderDoc is a stand-alone graphics debugging tool” Getting Started – Download standalone https://renderdoc.org/builds – Install it – Start Unity 5.3 or later (I tested with 5.4beta.f2) – Right click over the Game- or Scenewindow title, RenderDoc option should be displayed in the menu, Select it […]
3
2016
Fake Tube Light Shader
Tried to test idea about tube lights (or “line light”), by using custom lighting in shader, you could sample the light several times from different positions/angles, so that it looks like the light is not just a single point. (not really working here properly yet, […]
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: […]
23
2016
Volumetric Image Effect Shader
Converted this old godrays shader ( http://unitycoder.com/blog/2012/10/02/fake-godrays-shader/ ) into image effect – interesting results! (see video below) Source codes below (Attach script to main camera) This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. […]
21
2015
Matrix Playground Shader
Finally decided to try shader matrices.. (because having issues with custom billboard shader) Doing Translate, Scale, Rotations with matrix operations seems quite simple actually! Would had been totally lost without these two links: http://www.codinglabs.net/article_world_view_projection_matrix.aspx http://www.gamedev.net/topic/610115-solved-rotation-deforming-mesh-opengl-es-20/#entry4859756 How to use the shader: – Get the source below, […]
6
2015
Custom shader Transparency & Batching issues
While updating this billboard shader https://github.com/unitycoder/DoomStyleBillboardTest , had couple strange shader issues: Problem#1: Overlapping transparent area clips other object behind it (see issue#6) This one was solved by adding “ZWrite Off” to the shader, apparently something to do how transparent objects get depth sorted..(?) http://docs.unity3d.com/Manual/SL-CullAndDepth.html […]
25
2015
Opaque Sprite Shader
(screenshot of modified shader properties in debug view mode) Modified built-in sprite shader so that its opaque, no color tint, and pixel snap is always on. Just to test if there are any performance benefits to use them for opaque sprite tiles, at least the […]
6
2015
Doom Style Billboard Shader
Testing Doom style billboard shader, where you can look sprite from different angles, still not completely finished but enough for testing.. * Note: I have no idea how the doom billboards work, just looking for similar style Related forum post: http://forum.unity3d.com/threads/relative-position-for-changing-2d-graphics-in-3d-environment.307086/ WebGL player: *coming later* […]
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