- Видео 36
- Просмотров 140 705
Benjamin Swee - Custom Unity Shaders
Канада
Добавлен 4 апр 2021
Udemy Course: www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B
Patreon: patreon.com/user?u=92850367
Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code.
The goal is to teach others how to write optimal shader code that is production-ready. I also want to try to recreate the cool-looking effects we see in other games. It would be awesome to see more and more people write shaders from scratch, understand it at a deeper level and ultimately create their own shaders.
For more in-depth access I do have a Udemy course that I will continue to update as I create more mini-lessons.
Patreon: patreon.com/user?u=92850367
Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code.
The goal is to teach others how to write optimal shader code that is production-ready. I also want to try to recreate the cool-looking effects we see in other games. It would be awesome to see more and more people write shaders from scratch, understand it at a deeper level and ultimately create their own shaders.
For more in-depth access I do have a Udemy course that I will continue to update as I create more mini-lessons.
Breaking Down Color Grade LUT For Unity 2022
Breaking Down Color Grade LUT For Unity 2022
Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code.
The goal is to teach others how to write optimal shader code that is production-ready. I also want to try to recreate the cool-looking effects we see in other games. It would be awesome to see more and more people write shaders from scratch, understand it at a deeper level and ultimately create their own shaders.
#unity3d #unitydeveloper #gamedev #shaders
For more in-dept...
Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code.
The goal is to teach others how to write optimal shader code that is production-ready. I also want to try to recreate the cool-looking effects we see in other games. It would be awesome to see more and more people write shaders from scratch, understand it at a deeper level and ultimately create their own shaders.
#unity3d #unitydeveloper #gamedev #shaders
For more in-dept...
Просмотров: 1 191
Видео
Custom Photoshop Post Effects In Unity 2022
Просмотров 959Год назад
Custom Post Effects In Unity 2022 | Photoshop Effects Break down of the effect: www.patreon.com/posts/custom-post-fx-87282124?Link& In this video I'm going to go over how to do Custom Post effects in Unity 2022 handling the pesky RTHandle. While I am showing this I will also give an overview of how to do some of Unity's Tint effects by following some of their math. Check it out! Ben here, and I...
Erosion Shaders In PBR For URP In Unity 2022
Просмотров 565Год назад
Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code. The goal is to teach others how to write optimal shader code that is production-ready. I also want to try to recrea...
AI Writes Unity Shader Code | ChatGPT + Unity Shaders
Просмотров 4,9 тыс.Год назад
AI Writes Unity Shader Code If you want to support my Patreon: patreon.com/user?u=92850367 Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code. The goal is to teach oth...
Create A Custom URP Post Effect In Unity
Просмотров 8 тыс.Год назад
If you want to support my Patreon: patreon.com/user?u=92850367 Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code. The goal is to teach others how to write optimal sha...
Adding Fresnel To The Custom URP Shader
Просмотров 2 тыс.Год назад
www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B If you want to support my Patreon: patreon.com/user?u=92850367 This is Custom URP shader part 2! I also added fresnel to this lesson as it is a simple way to get a deeper understanding of how we can add effects to a URP shader environment. Ben here, and I've been writing shaders and full systems of shaders in Unity...
Write A Custom URP Shader Using Unity BRDF
Просмотров 6 тыс.Год назад
If you want to support my Patreon: patreon.com/user?u=92850367 For more in-depth access I do have a Udemy course that I will continue to update as I create more mini-lessons. www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG s...
A beginner's guide to writing a looping distortion effect
Просмотров 1,2 тыс.2 года назад
If you want to support my Patreon: patreon.com/user?u=92850367 Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code. The goal is to teach others how to write optimal sha...
Fancy Fresnel Shader In Unity | Shaders from scratch
Просмотров 4,7 тыс.2 года назад
If you want to support my Patreon: patreon.com/user?u=92850367 Fancy Fresnel Shader In Unity | Shaders from scratch Today we are doing a fresnel shader that's a bit of an upgrade from the previous ones. It doesn't even need the original character or model shader. Shader "RUclips/FresnelGlow" { Properties { _MainTex ("Texture", 2D) = "white" {} _DistortTex ("Distort Texture", 2D) = "white" {} _D...
Particle Erode Shader In Unity | Part 2 Random Erosion
Просмотров 7032 года назад
If you want to support my Patreon: patreon.com/user?u=92850367 Particle Erode Shader In Unity | Part 2 Random Erosion Udemy Course: www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B This particle erosion shader is part 2 of the erosion shader from this video ruclips.net/video/RtevmyHKvWE/видео.html It goes into how to do randomization of the particle erosion shade...
Create a particle erosion shader in Unity
Просмотров 2,1 тыс.2 года назад
If you want to support my Patreon: patreon.com/user?u=92850367 Create a particle erosion shader in Unity Udemy Course: www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B Hey guys, in today's video I'm going to teach you how to take advantage of the custom vertex streams that can send custom values to the particle shader. Ben here, and I've been writing shaders and ...
Write Your Own Holofoil Shader In Unity
Просмотров 2,3 тыс.2 года назад
If you want to support my Patreon: patreon.com/user?u=92850367 Write Your Own Holofoil Shader In Unity Udemy Course: www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B This holofoil shader is an old technique that was used to create shaders for cards and ui. Hope it brings back some memories from those nostalgic trading cards. Plasma Shader: ruclips.net/video/CJKGI...
Plasma Shader Additional Usages In Unity
Просмотров 9632 года назад
If you want to support my Patreon: patreon.com/user?u=92850367 Here are some usages of the plasma shader that I did in the previous video. Udemy Course: www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B Previous Plasma Video: ruclips.net/video/CJKGIXJjqlg/видео.html Hue Shift Video: ruclips.net/video/kiSKb54cogo/видео.html Ben here, and I've been writing shaders a...
Plasma shader in Unity
Просмотров 1,8 тыс.2 года назад
If you want to support my Patreon: patreon.com/user?u=92850367 Plasma shader in Unity Udemy Course: www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B Code breakdown: benjamin-swee.medium.com/plasma-shader-in-unity-3b5c3ce6e0db This plasma shader has a mass variety of uses. Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch fo...
Painting Textures On Models
Просмотров 9432 года назад
If you want to support my Patreon: patreon.com/user?u=92850367 Painting Textures On Models Udemy Course: www.udemy.com/course/unity-shader-development/?referralCode=2C4E167DEC9C4942796B Today I'll be going over how to paint textures onto models, using Unity's polybrush tool to assist us in painting vertex colors. Let me know if this is helpful for you and your games! Ben here, and I've been wri...
Unity Particle Distortion Effect - Custom Post effects
Просмотров 3 тыс.2 года назад
Unity Particle Distortion Effect - Custom Post effects
Hueshift, saturation, and brightening all in one shader in Unity
Просмотров 5 тыс.2 года назад
Hueshift, saturation, and brightening all in one shader in Unity
Vertex displacement shader in Unity
Просмотров 4,6 тыс.2 года назад
Vertex displacement shader in Unity
Create Distorting Lava Shader In Unity
Просмотров 8052 года назад
Create Distorting Lava Shader In Unity
Night Vision Shader In Unity | Post Effect
Просмотров 1,9 тыс.2 года назад
Night Vision Shader In Unity | Post Effect
Creating A Flow Shader Ideal For 2D Games
Просмотров 2,6 тыс.2 года назад
Creating A Flow Shader Ideal For 2D Games
Custom Ripple : Shockwave Effect In Unity | Post Effects
Просмотров 5 тыс.2 года назад
Custom Ripple : Shockwave Effect In Unity | Post Effects
Making Custom Blur, Frosted objects in Unity | Post Effects
Просмотров 7 тыс.2 года назад
Making Custom Blur, Frosted objects in Unity | Post Effects
Custom Unity Distortion Shader Using Post Processing
Просмотров 5 тыс.2 года назад
Custom Unity Distortion Shader Using Post Processing
Write Your Own Unity Custom Post Effects | Beginner Post Effects
Просмотров 3 тыс.2 года назад
Write Your Own Unity Custom Post Effects | Beginner Post Effects
Writing Unity Shaders Using Depth Textures
Просмотров 12 тыс.2 года назад
Writing Unity Shaders Using Depth Textures
Write Erosion Shaders In Unity From Scratch | Shader Fundamentals
Просмотров 3,2 тыс.2 года назад
Write Erosion Shaders In Unity From Scratch | Shader Fundamentals
Write Shaders That Rotate Textures In Unity | Shader Fundamentals
Просмотров 5 тыс.2 года назад
Write Shaders That Rotate Textures In Unity | Shader Fundamentals
This is really useful! Big question for me is how the “uv texture “ was generated
This is great for me, the abstract knowledge is explained very clearly and I'm not even a native English speaker
where can i get the UV texture? used for the flowing of the images
Great video. Your knowledge has so much value for me :) Thanks a lot!
Hello! Thank you for sharing this. Do you have the full script of the shader? When I was testing it, I had some issues with the shader.
U should make a video on procedural effects like noise and sdfs
Hey Ben would u be willing to make a video on procedural shapes and noise?
your channel is an actual goldmine for me, thank you! Its really hard to find shader tutorials that arent using graph.
you've managed to explain everything so much more eloquently than my actual professor lol
It will be nice if you would test to automate and create PBR textures from a single diffuse texture and material.
This channel is super helpful ty
Fantastic content and great narration.
Genuinely life-changing. Thank you!!
omg, you just slapped me in the face. i was messing around with builtin, never ever wrote a shader, mnaged to hack my way through the standard builtin shader with tons of copy paste, but then i have to implement my vertex shader to all other passes, to make the lighting perfect, i do all of that without a damn clue what i am doing lol. BUT what i see here is full mastery of the subject. insane. ill get my hands on this seriously and get to the next level, cause its so cool. really impressed by your ability to identify each problem's root cause with chirurgical precision, and at the speed of light.
Any good tutorials on learning ShaderLabs? I feel like a lot of the API/Documentation was lost to history
I'm bad with shader graph, so i want to start write shader with code, thank you sir, you have my sub.
Great tutorial. I struggled for days with GPT4 and different forums. Your video brought insights, but also did not work. No tint at all. What I have found out so far: cameraColorTarget should be replaced by cameraColorTargetHandle. also the shader: #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl" in your sample you just have .h as extension. Did someone make it work on Unity 2022.3.28f1 or later?
It's august 2024 ChatGPT still don't understand how to write perfect shaders..
I really appreciate that you took the time to explain literally everything line by line
so we will have to do this every time we want to create a urp shader?
does this only work with particular render pipelines? This is one of my gripes with unity. When you see a great tutorial, you never know if its compatible with your project...
Hi, does this work on VR?
Hey Swee! Helpful tutorials! I learn to Unity Shader. What do you advise for me? Can you help me with Roadmap?
hey Benjamin. I am working on a first person horror game for mobile. I tested it with legacy built in pipeline shaders and with urp shaders. everytime legacy built in pipeline has given me more performance in terms of shaders. but on the internet everyone recommends urp. maybe i need custom written urp shaders? would you recommend that? would that give me more performance?
Its so unfair that such great tutorials get ignored. Thank you for your content, it's incredible
For anyone using URP note this is for the built in render pipeline. It was straight forward to convert it to URP. Just get URP unlit basic shader template code from the Unity manual. The basic structure is very similar.
Why is this channel so hard to find, this is exactly what I was looking for!
Hello Benjamin, your lessons are really important and useful to me. It is very pleasing that you share such important information for us. I am a fan of yours. I have to ask you a question. While watching the lesson steps, I saw that the cameraColorTarget expression did not appear while I was writing code. The version I use is 2022.3.7f1. What can I use instead of this expression in this version?
Thanks! This is what I was looking for since I'm making a custom fog effect (distance based, not z-depth) but shader graph doesn't let you render unlit parts in a lit shader graph, so I can't make it a solid fog color without lighting... Thankfully with this I can so once again thanks!!! I'd say the only thing missing is support for additional lights other than the main directional light EDIT: for anyone looking to do the same, here's what worked for me: replace this: return UniversalFragmentPBR(inputdata, surfacedata); with this: Light mainLight = GetMainLight(inputdata.shadowCoord, inputdata.positionWS, inputdata.shadowMask); half4 color = UniversalFragmentPBR(inputdata, surfacedata); int additionalLightsCount = GetAdditionalLightsCount(); for (int i = 0; i < additionalLightsCount; ++i) { Light light = GetAdditionalLight(i, inputdata.positionWS, inputdata.shadowMask); half nl = saturate(dot(inputdata.normalWS, light.direction)); color.rgb += light.color * nl * light.distanceAttenuation * surfacedata.albedo; } return color;
I'm glad that I found you sir you are genius thank you so much for the great explanation ❤
Thank you man! it was amazing
Since this is pulling a volume into the feature for the RP, does that mean you cannot localize the custom feature to a specific camera?
Super helpful. Thank you!
Great tutorial! The shader looks awesome. Is it not working on Android devices though, any guess on how to solve this problem? Edit: Solved it by changing "RenderPipeline" = "UniversalRenderPipeline" for "RenderPipeline" = "UniversalPipeline"
Bro... You saved my life, I passed all day searching for resources and 2017 forums and the solution to all my problems, thank you so much
Thanks for the great video. What is the reason behind using uv.rg, in the tex2d function of the flow texture. Wouldn't that give us unexpected values since we are just using the colors values as the UV ? for example if it is r = 1 and g = 1, it would get the pixel color for the uv (1,1). i dont get how it fetches the full flow texture correctly based on the rg channels of the uv .
Thanks a lot! You really helped me very much
he does not mention it in this, but for some reason to hide the alpha channel on my image i had to clip it clip(col.a - 0.01f); edit: ok so the real problem was he still includes his blending code from the prev tutorial. But for this to work you should have blend set to "Blend SrcAlpha OneMinusSrcAlpha"
OMG, I learnt from shader bible and struggle with dstFactor. Turned out that was BG. Thanks you!!!
god you had OnRenderImage before and that was it what is this monstrosity
I noticed that the image projected in the "Main Camera" window when the camera is selected does not change according to the image processed in post-rendering. At 14:20 you can see that they are different. So was the camera image altered or not by post-rendering? Or was just a separate texture changed? Thanks for the video. God bless you.
Awesome video, thanks! Gave me some new insights into depth texutres.
Thank you, this really helps. I'm new to shader and I'm wondering if is there a way to add a padding around each tile? Like a 2 or 3 pixel gap between each tile.
damn I think I found a priceless channel
Awesome stuff so far really like your explanations, and the pace
Hi Benjamin, I'm watching your videos in order. First of all, thank you very much for doing this, it's amazing. Second, I have one question, you set in the material the render queue to be "Transparent", does the Tag in the shader "RenderType"="Opaque" have any relation?
Sir you are a very good teacher thanks for everything Do you have a chance to add the codes under the videos you shoot?
huh I did something similar for an entire year and trained up a really nice shader compiler ai
This looks great thank you! I'm getting this error though: Assets\Scripts\Overlay Effects\TintEffectFeature.cs(99,9): error CS0103: The name 'temp' does not exist in the current context Also is this a Standard Surface Shader or an Image Effect Shader in URP?
Possible without adding TintRenderFeature ? i don't really want to add a renderfeature for every effect i have
So i found an answer -> no.. You can try to modify some files located in Packages but don't do it -> Universal RP -> Runtime -> Passes
Can you show how to achieve this with Shadergraph in Built In Render Pipeline.