How to use object scale in shader graph - Unity tutorial

preview_player
Показать описание
To use the scale of an object in shader graph we need to modify UV values that we pass to the rest of our shader. In this video I will show you how to use Object node and Tiling and Offset node to do just that.

@Jettelly
Learn all there is about shaders in Unity

Learn to write more maintainable code using Design patterns by making a 2d platformer game:

Join the discord:

You can support me through Patreon:

#unity2d #shader

00:00 Intro
00:29 Water shader
01:54 Problem - We don't scale UVs
03:18 Tiling and Offset node
04:31 Including Object scale
05:58 Testing
Рекомендации по теме
Комментарии
Автор

I love when I watch your videos and always remember an old project with this issue.

That moment is great!

Jamie_Gamedev
Автор

You are amazing! I searched this stuff and talking with open AI hours and hours. Finally I found you. Subed and liked. Thank you

KaganParlatan
Автор

this was really really helpful for making an outline shader that always has a consistent thickness across objects, i've been trying to figure this out for ages, thanks so much :)

robosoup
Автор

Great! I'm going to make all objects with a custom scale value turn bright red to stop level designers from scaling assets!

erispe
Автор

Thank you soooo much, it really heped. I also added a divider node on the scale of the object as the texture was too small but now everything works perfect ❤

bettermichalke
Автор

You hero. That's rly helpful and straight to the point. Thank you man

dertobbe
Автор

Excellent and through explanation. Good and helpful video

JohnJohn-qrhr
Автор

I follow you because of this tutorial, You SAVE MY LIFE!!!!

hardworkerstudio
Автор

Wow this is super useful and I love that you explain it too!!! Thanks for the video

RalfZzZ
Автор

another way you can achieve same effect is using Position in World space as UV input of Tiling and Offset node (or any other node with UV input, you may not even use Tiling node)

Amricium
Автор

Thank you so much for all the video's!!!

od
Автор

and for the 2D UI image? I just want to know to to get a size of RectTracnform too

hardworkerstudio
Автор

I'm curious as to whether this would be possible for 3D objects of varying sizes and shapes. Because it doesn't apply it uniformly

appleseedgames
Автор

thanks so much! do you know if there is a way to achieve the same in blender?

Hilian
Автор

Good video, but in the scene view the shader works just fine and when I hit play the texture is not tiled and scaled according to plane size. Do you know what may be causing this issue ?

alexandrek.
Автор

Thanks. The scale returned by my object node never changes, it stays the same no matter how much I scale the object, any idea why?

Kaldrin
Автор

Hey, I have two separate patterns and in one of them this method is working fine. But in the second when I attach it to the rectangle uv the results are wrong. How to do the same with rectangle node? Also thanks for your work! 👋

the_yashe
Автор

great video! super helpful! but what if instead of a plane, it's an odly sized cube? How do you get it to scale all 3 axis' correctly?

LOSerror
Автор

Is there a way to optimize this for 3D objects?

ZayJayPlays
Автор

Thanx so much!!! its exactly what i needed!!! You save the Day!!! 1+Sub

batthecatgames
welcome to shbcf.ru