图形学复习笔记
15:35 2019/10/18
反射,折射的推導(dǎo)
18:23 2019/10/18
bezier curves 與 bezier spline的區(qū)別
bezier curves 曲線
bezier spline 樣條 或 樣條曲線,是由多段bezier曲線平滑連接而成的(共用端點(diǎn)控制點(diǎn))
22:14 2019/10/18
Graphics中,用Matrix把點(diǎn)從一個(gè)空間轉(zhuǎn)換至另一個(gè)空間是比較常見(jiàn)的操作,如把World Space Position轉(zhuǎn)換到View Space。但是對(duì)于NonOrthogonal matrix(非正交矩陣)來(lái)說(shuō),轉(zhuǎn)換之后的Normal就不垂直于它的Tangent了。
gl_NormalMatrix
https://www.cnblogs.com/bigdudu/articles/4191042.html
17:42 2019/11/18
注意,列優(yōu)先矩陣 m4x3表示4列3行,而不是4行3列
列優(yōu)先矩陣M,點(diǎn)P相乘: Q = MXP,運(yùn)算時(shí)是拿M的行乘列向量P,而不是拿M的列乘行向量P
這個(gè)說(shuō)明在OPENGL系列中,向量默認(rèn)是列向量
GL_TEXTURE_MIN_FILTER 紋理縮小(鏡頭拉遠(yuǎn))時(shí)采用的過(guò)濾(點(diǎn)采樣) 方式
GL_TEXTURE_MAG_FILTER 紋理放大(鏡頭拉近)時(shí)采用的過(guò)濾方式
22:10 2019/11/19
可變不可變紋理,體現(xiàn)在如何對(duì)它存儲(chǔ)數(shù)據(jù)上
可變紋理使用 glTexImage2D 來(lái)上傳數(shù)據(jù)
不可變紋理使用 glTexStrage2D 來(lái)上傳數(shù)據(jù)
10:35 2019/11/22
glUniformMatrix4fv(loc, count, GL_FALSE, addr)
glUniform4fv(loc, count, GL_FALSE, addr)
注意:
一,glUniformMatrix4fv表示的是一個(gè)4X4矩陣
glUniformMatrix3fv表示一個(gè)3X3矩陣
glUniformMatrix4X3fv表示一個(gè)4X3矩陣(4列3行)
二,對(duì)于matrix類型,count是指矩陣數(shù)量,對(duì)于非矩陣類型,count是指向量的個(gè)數(shù),例如:
float vec[4] = float[4]{1,2,3,4}
gluniform4fv(1, 1, gl_false, vec),表示1一個(gè)4元素?cái)?shù)據(jù)
10:42 2019/11/22
PCF的原文在這里,基于陰影圖的模糊算法是PCF的變體
----real time renderring 4----------------------------------------
7.5 Percentage-Closer Filtering
A simple extension of the shadow-map technique can provide pseudo-soft shadows.
This method can also help ameliorate resolution problems that cause shadows to
look blocky when a single light-sample cell covers many screen pixels. The solution is
similar to texture magnification (Section 6.2.1). Instead of a single sample being taken
off the shadow map, the four nearest samples are retrieved. The technique does not
interpolate between the depths themselves, but rather the results of their comparisons
with the surface’s depth. That is, the surface’s depth is compared separately to the
four texel depths, and the point is then determined to be in light or shadow for
each shadow-map sample. These results, i.e., 0 for shadow and 1 for light, are then
bilinearly interpolated to calculate how much the light actually contributes to the
surface location. This filtering results in an artificially soft shadow. These penumbrae
change, depending on the shadow map’s resolution, camera location, and other factors.
For example, a higher resolution makes for a narrower softening of the edges. Still, a
little penumbra and smoothing is better than none at all.
This idea of retrieving multiple samples from a shadow map and blending the
results is called percentage-closer filtering (PCF) [1475].
總結(jié)
- 上一篇: 转载 用ShadowVolume画模型的
- 下一篇: 【转】图形学基础之透视校正插值