Benjamin Swee - Custom Unity Shaders
Benjamin Swee - Custom Unity Shaders
  • Видео 36
  • Просмотров 140 705
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...
Просмотров: 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...
Write A Unity Vignette Post Effect
Просмотров 6 тыс.2 года назад
Write A Unity Vignette Post Effect
Unity Particle Distortion Effect - Custom Post effects
Просмотров 3 тыс.2 года назад
Unity Particle Distortion Effect - Custom Post effects
Radial reveal shader in Unity
Просмотров 2,1 тыс.2 года назад
Radial reveal shader in Unity
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

Комментарии

  • @thomasrobins78
    @thomasrobins78 16 дней назад

    This is really useful! Big question for me is how the “uv texture “ was generated

  • @NircoLP2004
    @NircoLP2004 25 дней назад

    This is great for me, the abstract knowledge is explained very clearly and I'm not even a native English speaker

  • @combobreakeross7661
    @combobreakeross7661 Месяц назад

    where can i get the UV texture? used for the flowing of the images

  • @Someone-fu7wz
    @Someone-fu7wz Месяц назад

    Great video. Your knowledge has so much value for me :) Thanks a lot!

  • @Eleven-bq2eq
    @Eleven-bq2eq Месяц назад

    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.

  • @bannggz7877
    @bannggz7877 Месяц назад

    U should make a video on procedural effects like noise and sdfs

  • @bannggz7877
    @bannggz7877 Месяц назад

    Hey Ben would u be willing to make a video on procedural shapes and noise?

  • @cory99998
    @cory99998 Месяц назад

    your channel is an actual goldmine for me, thank you! Its really hard to find shader tutorials that arent using graph.

  • @ms.awesome
    @ms.awesome Месяц назад

    you've managed to explain everything so much more eloquently than my actual professor lol

  • @Zenosart
    @Zenosart Месяц назад

    It will be nice if you would test to automate and create PBR textures from a single diffuse texture and material.

  • @doneyes
    @doneyes 2 месяца назад

    This channel is super helpful ty

  • @sharris234
    @sharris234 2 месяца назад

    Fantastic content and great narration.

  • @sook-iii
    @sook-iii 3 месяца назад

    Genuinely life-changing. Thank you!!

  • @genkidama7385
    @genkidama7385 3 месяца назад

    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.

  • @VDiabloV1
    @VDiabloV1 3 месяца назад

    Any good tutorials on learning ShaderLabs? I feel like a lot of the API/Documentation was lost to history

  • @anhvu8804
    @anhvu8804 3 месяца назад

    I'm bad with shader graph, so i want to start write shader with code, thank you sir, you have my sub.

  • @dontfeedthetroll7224
    @dontfeedthetroll7224 3 месяца назад

    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?

  • @HordorDev-ms7sj
    @HordorDev-ms7sj 3 месяца назад

    It's august 2024 ChatGPT still don't understand how to write perfect shaders..

  • @criss1386
    @criss1386 4 месяца назад

    I really appreciate that you took the time to explain literally everything line by line

  • @learninglearning2
    @learninglearning2 4 месяца назад

    so we will have to do this every time we want to create a urp shader?

  • @TheUncutAngel
    @TheUncutAngel 4 месяца назад

    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...

  • @joonasojanen4108
    @joonasojanen4108 4 месяца назад

    Hi, does this work on VR?

  • @dovlet_chopa
    @dovlet_chopa 4 месяца назад

    Hey Swee! Helpful tutorials! I learn to Unity Shader. What do you advise for me? Can you help me with Roadmap?

  • @mishikokenkebashvili879
    @mishikokenkebashvili879 4 месяца назад

    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?

  • @burnobad
    @burnobad 5 месяцев назад

    Its so unfair that such great tutorials get ignored. Thank you for your content, it's incredible

  • @rja421
    @rja421 5 месяцев назад

    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.

  • @derboss66
    @derboss66 6 месяцев назад

    Why is this channel so hard to find, this is exactly what I was looking for!

  • @huseyinpehlivan6072
    @huseyinpehlivan6072 6 месяцев назад

    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?

  • @aleksp8768
    @aleksp8768 6 месяцев назад

    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;

  • @atozcontenthub1047
    @atozcontenthub1047 7 месяцев назад

    I'm glad that I found you sir you are genius thank you so much for the great explanation ❤

  • @hossein818
    @hossein818 7 месяцев назад

    Thank you man! it was amazing

  • @jayleo500
    @jayleo500 7 месяцев назад

    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?

  • @breggs
    @breggs 7 месяцев назад

    Super helpful. Thank you!

  • @javisin
    @javisin 7 месяцев назад

    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"

    • @CAHC_2509
      @CAHC_2509 6 месяцев назад

      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

  • @TenzinDayoe-vy6vu
    @TenzinDayoe-vy6vu 7 месяцев назад

    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 .

  • @DP-lr4lg
    @DP-lr4lg 7 месяцев назад

    Thanks a lot! You really helped me very much

  • @jayleo500
    @jayleo500 8 месяцев назад

    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"

  • @theEndIsKami
    @theEndIsKami 8 месяцев назад

    OMG, I learnt from shader bible and struggle with dstFactor. Turned out that was BG. Thanks you!!!

  • @tucan7112
    @tucan7112 9 месяцев назад

    god you had OnRenderImage before and that was it what is this monstrosity

  • @datawebcrawler8134
    @datawebcrawler8134 9 месяцев назад

    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.

  • @yoyomario
    @yoyomario 9 месяцев назад

    Awesome video, thanks! Gave me some new insights into depth texutres.

  • @PistonTulip
    @PistonTulip 9 месяцев назад

    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.

  • @ClimFreeFeelRain
    @ClimFreeFeelRain 9 месяцев назад

    damn I think I found a priceless channel

  • @amac333
    @amac333 9 месяцев назад

    Awesome stuff so far really like your explanations, and the pace

  • @Luthier91
    @Luthier91 9 месяцев назад

    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?

  • @huseyinpehlivan6072
    @huseyinpehlivan6072 10 месяцев назад

    Sir you are a very good teacher thanks for everything Do you have a chance to add the codes under the videos you shoot?

  • @ZazeLove
    @ZazeLove 10 месяцев назад

    huh I did something similar for an entire year and trained up a really nice shader compiler ai

  • @ObiWineKenobi
    @ObiWineKenobi 10 месяцев назад

    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?

  • @BRtn-nn9nr
    @BRtn-nn9nr 10 месяцев назад

    Possible without adding TintRenderFeature ? i don't really want to add a renderfeature for every effect i have

    • @BRtn-nn9nr
      @BRtn-nn9nr 10 месяцев назад

      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

  • @harshadjoshi3944
    @harshadjoshi3944 10 месяцев назад

    Can you show how to achieve this with Shadergraph in Built In Render Pipeline.