Search Unity

Share some experiences for those who want to learn rendering or shaders

Discussion in 'Shaders' started by cadenji, Jun 19, 2022.

  1. cadenji

    cadenji

    Joined:
    Jul 19, 2017
    Posts:
    2
    I guess many developers have this experience: you want to add a cool effect to your game, and after searching on Google, you find that you need to write a shader. Since a shader is a program running on the GPU, its running method is very different from the usual program. What is a vertex shader and what is a fragment shader? You tried going through the "Shaders chapter" of the Unity manual, but you still don't know where to start.

    Actually implementing a software renderer is a good way to learn about rendering and shaders. Writing a simple rasterization based renderer is not difficult, you can find many tutorials online. Rendering a 3D model without using the graphics API allows you to familiarize yourself with the working principle of the rendering pipeline and master the skills of shader writing.

    Here is my recently implemented software renderer (https://github.com/cadenji/foolrenderer), implemented many features:

    triangle_rasterization.jpg

    draw_african_head.jpg

    gamma correction.jpg

    pbr_materials.jpg

    I've shared some great learning materials on the renderer's GitHub page that I hope will help you:
    learning_materials.png
     
    frosted and CodeSmile like this.
  2. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Great resource! I would highly recommend anyone who is interested in learning shaders to also have a plug around on shadertoy.com - it's a great way to learn by doing.
     
  3. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    This is super cool. Great idea!
     
  4. cadenji

    cadenji

    Joined:
    Jul 19, 2017
    Posts:
    2
    Antypodish likes this.