Giter VIP home page Giter VIP logo

sjm-shader-collection's Introduction

Unity Shader Collections

参考资料

《Unity Shader 入门精要》 大神博客 https://blog.csdn.net/puppet_master

简述

这里收录了我学习Shader时模仿或者自制的一些效果,并记录了实现这些效果的技术要点以及我对实现的一些反思与感悟。轻戳技术要点就可以看到SJM在写这些效果的时候遇到的各种奇奇怪怪的问题和他的解决方式喔~~~

其中参考的资料都会在原文中提及,如果是将参考资料的一部分原文原封不动的搬过来的话,会像下面这样使用引用符号括起来~

这里类比一段摘抄的原文

Volume 01 Diffuse 基于兰伯特光照模型的漫反射、高光反射光照 -> 技术要点

  1. 逐片元漫反射

Avater

  1. 逐顶点漫反射

Avater

Volume 02 Texture 纹理的简单应用 -> 技术要点

  1. 简单纹理映射

Avater

  1. 简单法线纹理映射(逐渐加大物体表面凹凸程度)-> 技术要点

Avater

  1. 渐变纹理 -> 技术要点

Avater

Volume 03 Alpha 透明效果 -> 技术要点

  1. 透明度测试(在立方体上挖洞) -> 技术要点

Avater

  1. 透明度混合 -> 技术要点

Avater

Volume 04 ForwardRender 渲染路径、阴影 -> 技术要点

  1. 基于ForwardAdd实现多光源照射 -> 技术要点

Avater

  1. 阴影的接受与投影 -> 技术要点

Avater

Volume 05 CubeMap 立方体纹理 -> 技术要点

  1. CubeMap实现天空盒的反射 -> 技术要点

Avater

  1. 玻璃效果的折射 -> 技术要点

Avater

  1. 火焰扭曲的折射效果 -> 技术要点

Avater

Volume 06 VertexChange 顶点变换 -> 技术要点

  1. 序列帧动画 -> 技术要点

Avater

  1. 广告板 -> 技术要点

Avater

在不使用广告版的情况下是这样的:

Avater

  1. 广告板+序列帧动画(可以将2D动画移植到3D游戏中)

Avater

在不使用广告版的情况下是这样的:

Avater

Volume 07 SimplePostEffect 简单屏幕后处理

原图:

Avater

  1. 高斯模糊

Avater

  1. Bloom

Avater

  1. 运动模糊(基于当前帧与上一帧混合的方案制作)

Avater

  1. 基于边缘检测进行描边(使用屏幕像素值和sobel算子判断边缘)

Avater

Volume 08 DepthNormalTexture 深度和法线纹理的简单应用

  1. 运动模糊(使用矩阵变换和深度重建世界坐标)

Avater

  1. 基于高度的雾效(使用射线+摄像机位置+深度重建世界坐标)

Avater

Volume 09 EdgeDetection 详解边缘检测

  1. 基于边缘检测的转场效果(基于噪声、uv变换、边缘检测)

Avater

  1. 基于边缘检测的子弹时间效果(基于重建世界坐标、噪声、uv变换、边缘检测、mask图)

Avater

Volume 10 Projector 投影仪的原理及简单应用

  1. 仿动画Revisions ED中人物以线条形式投影到大楼上的效果(虽然跟动画里效果差了十万八千里就是了)

Avater

第二版,加上了_Time变量和噪声使线条呈不规则运动(依旧不像):

Avater

sjm-shader-collection's People

Contributors

swordjoinmagic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.