Search Unity

Can someone give me an on-ramp or a breakdown to begin learning how to make this shader effect?

Discussion in 'Shaders' started by FeldIV, Nov 4, 2021.

  1. FeldIV

    FeldIV

    Joined:
    Dec 16, 2018
    Posts:
    27
    First of all, thank you in advance; I'm not sure how how common this type of question is or how to phrase it appropriately, but here goes.

    So I'm very interested in making low poly environments with pixel textures with good lighting, so I saw this and was intrigued, and his explanation, with a link to the Unity forums and well, it confused the hell out of me.

    "I calculated the screen space derivatives of each of the interpolator values I get in my input from the vertex program and transform the based on the derivative from the uv value."

    So I don't know what ANY of this means. Like, I can't emphasize this enough, none. I checked out the forum link I put up about and it lead to a terrifying rabbit hole of Googling every proper noun. I'm familiar with Blender, pixel art, and unity a little bit, but on this I'm stumped.


    I'm very willing to put in the work to learn it though, but I'd love some sort of plain english on ramp to go off of. Like, for starters, what does that quoted sentence mean in plain English?

    I'd love to just jump into shaders straight up, but then I also just want to specialize and zero into this effect, specifically, as opposed to attempting to spread myself thin learning everything there is to know, which I'll end up attempting to do if I'm unguided.

    Can anyone give me a lifeline into deciphering this? I'm willing to put in the effort, but I just need a conceptual 'in'.

    Thank you all so much!
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    The Unity forums link you have up there contains a lot of pretty good information. Someone even posted a URP implementation of it : https://github.com/truepak/UnityTexelShaders ( and someone else posted a screenshot of his shader graph version).

    I'll try, but this feels a lot like one of the times where I try my best to explain something, then bgolus swoops in and provides a much more clear and accurate version... but anyway.

    But before I do, how much knowledge do you have of shaders and general gamedev? Do you know what UVs are? What interpolators are? Normals? Screen space? (partial) Derivatives?