Browsing articles in "shaders"
Sep
16
2016

Grayscale Image Effect with Exclude Layers

Testing grayscale image effect with added ExcludeLayers option (*just took the script parts from CameraMotionBlur effect, since it supports excluding layers) Instructions: – Attach the script below to your camera *You need to import default effects package first (Assets/Import Package/Effects) – Select excludeLayers (by default […]

Sep
16
2016

Custom Sprite Bloom HDR Shader

Tried to do this shader mentioned in the forums (link), to have a Bloom image effect only on certain sprites. See main image^ 2 same sprites, different material, so only 1 gets bloomed (even though the Bloom is full screen image effect) Instructions: – Download […]

Aug
20
2016

Sprite Shader with Clip() *Discard pixels

Testing what happens if add clip(discard), remove transparency and remove color tint from default Sprite Shader.. Just wanted to see if there is big difference or not, but seems like no huge difference on PC (asus laptop, gtx970m), unless you have thousands of sprites on […]

Aug
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 […]

Jul
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, […]

Jun
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: […]

Mar
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. […]

Dec
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, […]

Nov
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 […]

Apr
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* […]

Pages:«123456»

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.