图形学复习笔记
15:35 2019/10/18
反射,折射的推導
18:23 2019/10/18
bezier curves 與 bezier spline的區(qū)別
bezier curves 曲線
bezier spline 樣條 或 樣條曲線,是由多段bezier曲線平滑連接而成的(共用端點控制點)
22:14 2019/10/18
Graphics中,用Matrix把點從一個空間轉(zhuǎn)換至另一個空間是比較常見的操作,如把World Space Position轉(zhuǎn)換到View Space。但是對于NonOrthogonal matrix(非正交矩陣)來說,轉(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,點P相乘: Q = MXP,運算時是拿M的行乘列向量P,而不是拿M的列乘行向量P
這個說明在OPENGL系列中,向量默認是列向量
GL_TEXTURE_MIN_FILTER 紋理縮小(鏡頭拉遠)時采用的過濾(點采樣) 方式
GL_TEXTURE_MAG_FILTER 紋理放大(鏡頭拉近)時采用的過濾方式
22:10 2019/11/19
可變不可變紋理,體現(xiàn)在如何對它存儲數(shù)據(jù)上
可變紋理使用 glTexImage2D 來上傳數(shù)據(jù)
不可變紋理使用 glTexStrage2D 來上傳數(shù)據(jù)
10:35 2019/11/22
glUniformMatrix4fv(loc, count, GL_FALSE, addr)
glUniform4fv(loc, count, GL_FALSE, addr)
注意:
一,glUniformMatrix4fv表示的是一個4X4矩陣
glUniformMatrix3fv表示一個3X3矩陣
glUniformMatrix4X3fv表示一個4X3矩陣(4列3行)
二,對于matrix類型,count是指矩陣數(shù)量,對于非矩陣類型,count是指向量的個數(shù),例如:
float vec[4] = float[4]{1,2,3,4}
gluniform4fv(1, 1, gl_false, vec),表示1一個4元素數(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画模型的
- 下一篇: 【转】图形学基础之透视校正插值