Тёмный
No video :(

Unity SHADERGRAPH Episode 5: MeshHighlighter 

Wilmer Lin GA School
Подписаться 12 тыс.
Просмотров 8 тыс.
50% 1

Intro to ShaderGraph (5/5)
Here we create a simple script to toggle between the GameObject and its highlighted version based on mouse events.

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@RonYonassiProduction
@RonYonassiProduction 4 года назад
THE BEST TUTORIAL I'VE SEEN FOR SHADER GRAPH,PLEASE MAKE PARTICLES TUTORIAL IT WOULD BE VERY HELPFULL,APPRECIATE
@headecas
@headecas 3 года назад
one hour to realize i didnt add the mesh to the mesh field in the script
@darkystreaming
@darkystreaming 2 года назад
Instead of swapping gameobjects I'm actually trying to change the value of the fresnel strength in C# but my code keeps saying that property doesn't contain a float or range property Like this is the error message: Material 'highlight_herb_grand (Instance)' with Shader 'Shader Graphs/highlight' doesn't have a float or range property 'multiply_potencia' UnityEngine.Material:GetFloat (int) Also when I try to access the float data for that property y says its float value it's 100.0f when its actually 0.0f
@Shiitake0.0
@Shiitake0.0 10 месяцев назад
are you using the reference name instead of property name?
@SDK_Gaming
@SDK_Gaming 5 лет назад
Could you share me the Script, I found some error like "Assets\TutorialInfo\Scripts\Editor\MeshHighlighter.cs(23,29): error CS1061: 'MeshRenderer' does not contain a definition for 'enable' and no accessible extension method 'enable' accepting a first argument of type 'MeshRenderer' could be found (are you missing a using directive or an assembly reference?)" How to fix this Bro.
@AZTECMAN
@AZTECMAN 3 года назад
I know this is a bit late, but perhaps you are using the word 'enable' when you mean to be using 'enabled'. Every Component of a game object has a property named 'enabled', including the MeshRenderer. You'll get an error if you try to disable the Transform, but otherwise you can toggle any component (that I know of) this way.
@SDK_Gaming
@SDK_Gaming 3 года назад
@@AZTECMAN I forgot the file where I kept. Thanks I will note it down.
@jwshohan
@jwshohan 5 лет назад
nice tutorial
@saikoraito
@saikoraito 3 года назад
Instead of duplicating the object, why not just swapping the material?
@GameAcademySchool
@GameAcademySchool 3 года назад
It was just to make the tutorial easier. Normally just add a Branch Node and public property. Then switch the Branch true or false
@aronbroom7977
@aronbroom7977 3 года назад
@@GameAcademySchool I'm extremely new the shaders and shader-graph, but based on this unity documentation (docs.unity3d.com/Packages/com.unity.shadergraph@6.9/manual/Branch-Node.html) it would seem that with the Branch Node you mentioned, the shader code on the branch is calculated even if it isn't used. Wouldn't that be non-ideal performance-wise, especially if you want this highlight effect to be possible for all clickable objects or something (i.e. all those objects are now constantly performing the fresnel calculations every frame even though they aren't moused over)? Would @psychlght suggestion of having two different materials that are swapped be more performant in such a case? In particular since this kind of swap is happening only rarely (e.g. say at most once per second or once every 60 frames).
@GameAcademySchool
@GameAcademySchool 3 года назад
@@aronbroom7977 that doesn’t sound correct. View the latest version of the documentation which says “Both sides of the branch will be evaluated in the shader, and the branch not used will be discarded.” They said as much in one of their tech talks at Unite.
@aronbroom7977
@aronbroom7977 3 года назад
@@GameAcademySchool Thanks for the response! I didn't realize I was on an older version of the documentation. Tested this with 4000 objects going back and forth between a shader with no branch-node and one with a branch-node turned off, and indeed the performance is exactly the same :)
Далее
Unity SHADERGRAPH Episode 6: SubGraphs
17:54
Просмотров 17 тыс.
Unity SHADERGRAPH Episode 7: Time
15:09
Просмотров 18 тыс.
Wife habit 😂 #shorts
00:16
Просмотров 61 млн
DISSOLVE using Unity Shader Graph
10:33
Просмотров 672 тыс.
Unity Shadergraph: Rain Drop Ripples!
21:58
Просмотров 54 тыс.
How Games Have Worked for 30 Years to Do Less Work
23:40
An introduction to Raymarching
34:03
Просмотров 135 тыс.
Intersection Material using Shader Graph in Unity
11:37
Unity Shadergraph Tutorial - Cracked Ice
12:15
Просмотров 53 тыс.
Unity DOTS: C# Job System
19:47
Просмотров 20 тыс.
Wife habit 😂 #shorts
00:16
Просмотров 61 млн