Using Textures In The Vertex Shader - Advanced Materials - Episode 34

preview_player
Показать описание
In this shader tutorial for Unreal and Unity, I explain why standard texture sampling doesn't work in the vertex shader and show the tricks required to make it happen. I also discuss a couple of tips for vertex shader textures.

------------------------------------

Here's last week's tutorial on shader optimization using the vertex shader:

Here's the playlist for all of the videos in the series:

Shader Book Recommendations

------------------------------

Theme Music
Peace in the Circuitry - Glitch Hop

Background Music
Speo - The Little Things

#UnrealEngine #shadergraph #Unity
Рекомендации по теме
Комментарии
Автор

Great explanation. Defenitely we need more videos. Thank you

malindurashmika
Автор

Very cool! I can see this being very useful!

elpainto
Автор

Although I already know this, I really appreciate that you are share thoses knowledge selflessly thank you Ben!

hongrenyan
Автор

This can be useful for noise textures for sure, also don't forget that unreal will let you just bake a texture down to a mesh's vertex colors if you want to skip using a texture entirely

CorporalDanLives
Автор

You're awesome! :) I was wondering if I could somehow make mask based on texture for positioning the vertex and found this. Thank you :)

WhiteWolfIron
Автор

I came here to see if unity has something similar to unreals "vertex interpolator node" and the video totally delivered =)

env_warby
Автор

As always Ben love these videos. wonder if you ever work with other things like Niagra

MartinPHE
Автор

Merry Xmas Ben! got a special request I hope you will address- Any chance you will update your advanced landscape material in the future to be even better using 5.3 or a newer engine features? like the returning world displacement using height, maybe substrate, or even talk about using the RVT method

itay
Автор

Though there is a difference even with the gradient texture - in fragment shader it looks more smooth. Can be seen really good with lerp or something.
And interpolation between vertices seems to be very apparent (note as there is no smooth transition of color between them) - I think with gamma correction it would feel more natural.

andrey
Автор

First of all i have to thank you for all of your videos. I like your calm and detailed explanations even the comparisons to connected things in the real world are pretty helpful!
Regarding this topic here i have a question. You showed the quality loss in the detail of the texture when doing the math in the vertex shader and you always said to solve this you have to raise the polycount on the used mesh again to achieve the detail again or do it in the pixelshader. In the past raising the polycount was a cruel thing to do and completely understandable to avoid this. But since i've learned about the power of UE's nanite system i have the question if its maybe better to do the texture calculation in the vertex stage all the time but simply provide higher poly/vertex count meshes instead. The dynamic polycount driven by nanite should resolve the heavy polycount in general. What do you think would this way be much more performant when working with nanite in addition to this technique?

christiankrause
Автор

I know this has nothing to do with this video, but I was wondering if you where going to cover how to do things with the new substrate system in Unreal in the future?

stevenhancock
Автор

Hey Ben! HLSL or GLSL?

I want to start writing shaders and move them around in applications. I can't decide whenever to start building a library of shaders in glsl or hlsl. Most applications use hlsl, but glsl seems to be supported wider, because its opensource. For example GLSL has a web library so I can reuse a shader in a webproject, but hlsl doesn't and its more windows orianted. Do you have any suggestions, recommendations, thoughts?

Thanks in advance, liked the video!

Edit: Also it needs to be somewhat code centered, because I want to manipulate a svg graphic based on predifend data I want to make with an illustrator script. Could I do all this inside the shadergraph? I think its a bit more specific, then this right?

gergolaky
Автор

Hi Ben. In the Unity part you show it's needed to use a different technique for determining the mipmap level of the texture. However, in the Unreal part this wasn't done at all, I'm wondering why this is the case? Does Unreal automatically switch over to a different technique under the hood? Thanks in advance for any reactions! Keep up the great work 🙂

ThomDeM
Автор

Would you be able to elaborate on this stack overflow answer?

"Fragment shaders are a more accurate name for the same functionality as Pixel shaders. They aren’t pixels yet, since the output still has to past several tests (depth, alpha, stencil) as well as the fact that one may be using antialiasing, which renders one-fragment-to-one-pixel non-true."

Are you seeing the results of the fragment shader displayed as the pixel shader when it's being viewed in your scene like in that top left preview plane?

ethanwasme