Static 写在前面
咳咳,由于本人英语水平实在有点着急,而众所周知外文资料是一个逃不掉的话题……恰好现在开始接触shader,因此就打算用尽自己的中学英语水平记录下学shader的过程,这样多少能培养一点阅读英语文献的感觉吧……
所以这系列文章本质上是个人学习用,毕竟全是些不严谨的用词、不严谨的思考,甚至还会有英语方面的语法错误……这段声明也算是为意外点进来的朋友们负责,这系列文章只是个人学习随笔,而非专业参考文章!此外我不会在文章中介绍部分代码的数学原理,毕竟数学这东西用中文都还没学明白……虽然文章没什么营养价值,但多少有我的一点点思考,也算是在整个互联网里留下点什么吧……OK该系列的全部中文部分到此为止,后面新的文章里不再声明!
封面是个人一张风景速途练习,至于画原创场景厚涂那还早……
【如果有有缘人看到后面的文章后倒回来看这篇才看见这个声明,那送您一串开心的小符号 :)】
0、Before the rendering starts...
To build a simplest unity shader project (I'll say it as "shader" later, but remember unity shader is never a real shader), we don't need to assign any Properties, RenderSetup and Tags. Let's start with CGPROGRAM (and I'm used to adding ENDCG at the same time)
Shader "please_write_down_a_proper_dir"{
Properties{
// not required now
}
SubShader{
// RenderSetup and Tags
Pass{
// RenderSetup and Tags
// Start from here!
CGPROGRAM
// coding...
ENDCG