Hey so I've been looking for practical resources for understanding HLSL online, even went through Ben Clowards preferred references but they were all pretty outdated in the sense that generally they wanted me to use software that isn't supported anymore. And It's one thing to learn how to build a specularity or bump function but we already have all this in the game engines I'm using but I still needed the ability to comprehend HLSL for specific shader functions such as drawing a grid of circles, have them animated and so on. I will work my way back to understanding the fundamentals but my current trajectory requires me to be building more advanced VFX shaders right now so the resource you provide here is really important to me. Thank you so much, with what I've learned so far I can already create some cool visuals that I otherwise couldn't since I'm still learning. Please keep going with these. I'd say one thing I'm interested to know is how to have a grid of repeating UV's be placed randomly and overlap each other. So you have that 10x10 grid of circles from your last video, but then have them randomly scattered around.
Glad your enjoying the videos, There's a lot more to cover and more tutorials coming in this series very shortly. HLSL or Shader Programming is not my specialty, especially since Math is not my strongest skill. But slowly I'm trying to transfer all the knowledge I do have about it into these videos for others. So its not as difficult to pick up as it was for me originally. For randomly scattering circles you can try something like this. But ill make a proper video on randomization in one of the upcoming tutorials. This will draw 250 circles over the UV 0-1 coordinates based on Random X and Y Values. Just change the numbers in the float2() to get different randomizations/variations. For fun I just used 12345679.etc --- float result = 0; for(int i = 0; i < 250; i++) { float randX = smoothstep(0, 1, frac(sin(dot(float2(i, i), float2(12.345, 67.89))) * 12345.67)); float randY = smoothstep(0, 1, frac(sin(dot(float2(i, i), float2(98.765, 43.21))) * 76543.21)); float2 pos = float2(randX, randY);
result += length(pos-uv) < size; } return(result); --- Cheers!
@renderBucket you are wonderful! I'm so amazed. What I'm going to do with this is create a faux LiDar mask where each dot would either contain a single colour from the texture sample or if I increase the size of each circle, reveal more of the texture itself. I was doing this with niagara and it works nicely but this scene has a lot going on so I have to be as performance conscious as possible :) I'm learning and understanding so much from you already, I will certainly be making patreon contributions shortly you can count on it. Thank you and thanks for being so incredible!
Hey could you give us some insights in the performance impact of shaders? Like, how do I know if my shader is expensive and how do I know if it's cheap. with some practical references? kind regards, Simon your videos are frigging awesome.
Your tutorials are next level! You are Epic
Thank you for this series. Please continue this HLSL in unreal. 💚
this series is something else amazing tutorial
A niche very interesting. Keep it up. Thx for sharing.
Oh man this is a great series, please keep it going forever. lol Thank you so much for sharing your knowledge.
Hey so I've been looking for practical resources for understanding HLSL online, even went through Ben Clowards preferred references but they were all pretty outdated in the sense that generally they wanted me to use software that isn't supported anymore. And It's one thing to learn how to build a specularity or bump function but we already have all this in the game engines I'm using but I still needed the ability to comprehend HLSL for specific shader functions such as drawing a grid of circles, have them animated and so on.
I will work my way back to understanding the fundamentals but my current trajectory requires me to be building more advanced VFX shaders right now so the resource you provide here is really important to me. Thank you so much, with what I've learned so far I can already create some cool visuals that I otherwise couldn't since I'm still learning.
Please keep going with these. I'd say one thing I'm interested to know is how to have a grid of repeating UV's be placed randomly and overlap each other. So you have that 10x10 grid of circles from your last video, but then have them randomly scattered around.
Glad your enjoying the videos,
There's a lot more to cover and more tutorials coming in this series very shortly.
HLSL or Shader Programming is not my specialty, especially since Math is not my strongest skill. But slowly I'm trying to transfer all the knowledge I do have about it into these videos for others. So its not as difficult to pick up as it was for me originally.
For randomly scattering circles you can try something like this. But ill make a proper video on randomization in one of the upcoming tutorials.
This will draw 250 circles over the UV 0-1 coordinates based on Random X and Y Values. Just change the numbers in the float2() to get different randomizations/variations. For fun I just used 12345679.etc
---
float result = 0;
for(int i = 0; i < 250; i++)
{
float randX = smoothstep(0, 1, frac(sin(dot(float2(i, i), float2(12.345, 67.89))) * 12345.67));
float randY = smoothstep(0, 1, frac(sin(dot(float2(i, i), float2(98.765, 43.21))) * 76543.21));
float2 pos = float2(randX, randY);
result += length(pos-uv) < size;
}
return(result);
---
Cheers!
@renderBucket you are wonderful! I'm so amazed. What I'm going to do with this is create a faux LiDar mask where each dot would either contain a single colour from the texture sample or if I increase the size of each circle, reveal more of the texture itself.
I was doing this with niagara and it works nicely but this scene has a lot going on so I have to be as performance conscious as possible :)
I'm learning and understanding so much from you already, I will certainly be making patreon contributions shortly you can count on it.
Thank you and thanks for being so incredible!
Hey could you give us some insights in the performance impact of shaders?
Like, how do I know if my shader is expensive and how do I know if it's cheap. with some practical references?
kind regards,
Simon
your videos are frigging awesome.
i see in my sidebar a video called optimizing shaders - instruction cost , might be what you're looking for
Question: why can adding the offset to result variable produce multiple circles on the texture?
Please more, this is addictive, maybe use it in umg?
cool
😮😮😮😮😮😮😮😮😮😮😮😮