当前位置:网站首页>shader着色器
shader着色器
2022-06-11 12:50:00 【怪力左手】
数学
齐次坐标:点p=a+b+c+o(原点),向量p=a+b+c,所以向量的其次坐标(a,b,c,0),点(a,b,c,n)
其次坐标变换,n>1放大,n<1缩小
对称变换
| -1 0 0 0 |
| 0 1 1 0 |
| 0 0 1 0 |
| 0 0 0 1 |
参考:齐次坐标变换_走过_冬天的博客-CSDN博客_齐次坐标变换
四元数:(x,y,z,w),(x,y,z)表示向量,w表示旋转角度,
四元数q1*q2叉乘:
(w1w2 - x1x2 - y1y2 - z1z2) +
(w1x2 + x1w2 + y1z2 - z1y2) i +
(w1y2 - x1z2 + y1w2 + z1x2) j +
(w1z2 + x1y2 - y1x2 + z1w2) k
glsl
顶点shader(负责数据)和片段shader(负责颜色控制,没有顶点shader也可以直接控制颜色绘图如shadertoy上面的例子)
attribute顶点相关,uniform顶点无关数据,varying顶点和片段之间传递数据
变量前加highp、mediump、lowp精度声明
vec4:rgba、顶点坐标(齐次坐标)、xy成员返回vec2,xyz成员返回vec3
vec3:法线坐标(顶点所在面的法线)、
vec2:纹理坐标
sampler2D:访问二维纹理
raymarch:光线步进(3dmax中的射线检测)
sdf:符号距离函数,物体外部点值>0,物体内部点值<0,物体表面上的点==0
- 顶点缓冲区Vetex Buffer,存储点数据
- 索引缓冲区Index Buffer,存储顶点缓冲去的索引数据,减少数据重复,索引缓冲区存储的面或者空间数据
- GRADIENT_TRIANGLE、GRADIENT_RECT顶点数据,按照如下格式存储
- Bitmap,24位以上不包含调色板,24位以下包含调色板
法线坐标参考:OpenGL中求顶点的法线_GIS_Tracker的博客-CSDN博客_顶点法线
shader toy(webgl使用glsl规范)
vscode shader toy 插件
学习的网站:
Shader 绘制基础图形 - 掘金
Shadertoy BETA
The Book of Shaders: Shaping functions
shader editor(goole插件或者网页)
shader-scholl
cnpm install -g shader-school 运行shader-school命令
geeks3d
Shader Library (GLSL) | Geeks3D
glsl参考
边栏推荐
- 2022 vmvare download and installation tutorial on the latest official website (ultra detailed)
- What scenarios can the member management system of the multi guest swimming pool achieve?
- Chapter V data type (IV)
- [bug resolution] the form is paged to display the total data res.data total
- Quic resistance
- 为什么现在的会员制仓储店都集体爆发了?
- C event bus
- 逆向学习入门-优秀的汇编调试工具OllyDbg
- PADS使用之绘制原理图
- 游泳馆暑期业绩翻倍的方法
猜你喜欢

一个时代的终结!十年了吴恩达经典《机器学习》课程本月关闭注册,上线新课!...

场馆坪效这么低?关键在这两方面

Condition debug of pycharm

历史上的今天:Apple II 问世;微软收购 GECAD;发明“软件工程”一词的科技先驱出生...
![[bug resolution] the form is paged to display the total data res.data total](/img/92/1ddde16d35465f8dd53ebf90e249b8.png)
[bug resolution] the form is paged to display the total data res.data total

pip2pi和pypiserver及Apache在pip本地源配置中的应用实践

In the list of 618 projector hedging brands in 2022, dangbei projection ranked top 1 in the hedging rate of idle fish

经营养生理疗馆要注意什么问题?

Which brand of bone conduction Bluetooth headset is good? Five most popular bone conduction Bluetooth headsets

Ways to double the summer performance of natatoriums
随机推荐
【增加功能】select下拉多选 显示选中的人员
Deep learning and CV tutorial (14) | image segmentation (FCN, segnet, u-net, pspnet, deeplab, refinenet)
美容院管理系统如何解决门店运营的三大难题?
为什么现在的会员制仓储店都集体爆发了?
After Oracle deletes a user, it can still use the user to log in
Technical difficulties of secsha
2020.10.27 summary of Beijing Ali cultural and entertainment
How can non-standard automation equipment manufacturing enterprises achieve rapid and accurate quotation with the help of ERP system?
知物由学 | 行为时序建模在社交引流黑产识别中的应用
PADS使用之绘制原理图
Why are the current membership warehouse stores bursting out collectively?
Redis RDB和AOF
Is Zhima Z1 projector really easy to use? How about the actual effect?
启牛商学院给的券商账户是安全的吗?开户收费吗
. 5 string
Log management system, summary in multiple ways
Oracle 将数据导出到CSV(Excel)文件的方法
Application of pip2pi, pypiserver and Apache in PIP local source configuration
[interface] view the interface path and check the interface
机械设备制造企业,如何借助ERP系统做好委外加工管理?