Browsing articles in "Unity3d"
Mar
18
2020

Shader: Color Cycling

Color Cycling Shader test, because. Shader Source:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Effects/ColorCycle.shader How it works?Gray color value is used to pick color from the gradient, if gray texture pixel is 0.5, then you get that turquoise color from gradient texture.

Mar
13
2020

Shader: Scrolling Texture With Fill Amount

Quick test shader for this thread https://forum.unity.com/threads/smooth-filling-of-the-2d-pipe-with-texture.845848/#post-5584480 Shader source:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Patterns/ScrollingFill.shader Sample fbx file (used in screenshot)https://github.com/unitycoder/BlogUploads/blob/master/models/lineuv.FBX

Mar
12
2020

Particle System: Drawing Arrows Aligned to Moving Direction

Quick setup for this, Particle System:– Renderer/Mode: Stretched Particles– Camera Scale:0, Speed Scale: 0.1, Length Scale: 0 Arrow texture png

Mar
7
2020

Scale Canvas and UI with Screen Size

How to:From Canvas component, Canvas Scaler:– UI Scale Mode: “Scale with Screen Size”– Reference Resolution : 800 x 600– Screen Match Mode: Match with Width or Height– Match: 1 RectTransform settings for Text TextMeshPro:(other RectTransform values are default, like pivot)

Mar
5
2020

Shader: Drawing Circles Pattern

Drawing Pattern of Circles in shader. (test for this forum topic) Shader:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Patterns/CirclesPattern.shader References:– Drawing Shapes : https://thebookofshaders.com/07/– Drawing Patterns : https://thebookofshaders.com/09/

Mar
1
2020

Waves Shader

Tried to create similar waves in shader as this tweet: https://twitter.com/akivaw/status/1226681850564956160 Shader source:https://gist.github.com/unitycoder/7b501f5d6af03dbabd48c16c08767fe3*2 pass shader to draw underwater slightly differently

Feb
18
2020

Debug.Log: Show actual color from Color variable

Had to debug what color is the script returning for mouse pixel position, but printing out the value didn’t really help:Debug.Log(col);Since the output is like this (you don’t know whats the actual color)RGBA(0,349, 0,204, 0,416, 0,000) Enter Debug.Log with <color></color> and utf8 block:Debug.Log(“<color=#”+ColorUtility.ToHtmlStringRGB(col)+”>██████████</color> = “+col); […]

Feb
15
2020

Encode/Decode Audio To/From PNG Alpha Channel

Small test on embedding Audio data into PNG alpha channel.With added option to shuffle pixels to hide/”encrypt” original image and sound. To make sound file small enough, use this option to set low hz. Ideas for later:– Compress audio (tested RLE but didn’t do much […]

Feb
13
2020

Reference Image Viewer Editor Window

If you are working on a single monitor, and/or need to have some reference images in view.. Here’s a small editor plugin to show texture on a window. Source: https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Scripts/Editor/Tools/ReferenceImageViewer.cs Usage:– Copy file into your project, into some Editor/ folder– You can then use from […]

Feb
13
2020

How to use AudioImporter Sample Rate lower than 8000hz

Sound importer seems to allow only allows 8000hz as the lowest sample rate.. But you can force lower values by modifying the audioclip .meta file! First select PCM or ADPCM as the Compression Format: Then modify the audio clip meta file (same folder as the […]

Pages:«123456789...49»

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch Instagram

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.