일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- postgresql
- with
- sql
- awk
- mysql
- python
- DROP
- C++
- expect
- FIND
- 배열
- autovacuum
- 쉘
- if
- sqlite
- dataframe
- ngui
- conda
- ubuntu
- Unity
- boost
- pi
- c++11
- SSH
- SVN
- List
- Eclipse
- Shader
- pandas
- null
- Today
- Total
목록프로그래밍/3D (7)
その先にあるもの…
정리하기. matcap 사용 텍스쳐 만드는 법이 궁금해서 검색 sphere mapping, look up texture 찾아보기. http://egloos.zum.com/snakeoil/v/1092152https://ko.wikipedia.org/wiki/%EA%B5%AC%EB%A9%B4%EC%A2%8C%ED%91%9C%EA%B3%84http://iskim3068.tistory.com/23https://www.mvps.org/directx/articles/spheremap.htmhttp://www.clicktorelease.com/blog/creating-spherical-environment-mapping-shaderhttp://www.clicktorelease.com/code/spherical-nor..
Camera position : pCamera View : vCamera Near : nCamera Far : fCamera Fov : fovCamera aspect : aspect nearDist = p + ( v * n );farDist = p + ( v * f ); Hnear = 2.0f * ( Tan( fov /2.0f) * nearDist );Wnear = Hnear * aspect; Hfar = 2.0f * ( Tan( fov/2.0f) * farDist );Wfar = Hfar * aspect; ftl = farDist + ( up * ( Hfar / 2.0f ) ) - ( Camera.right * ( Wfar / 2.0f ) ); 그림 출처 : http://www.lighthouse3d...
D3DRS_ZENABLE - used to set the buffering method. Choices are D3DZB_TRUE to enable Z buffering, D3DZB_USEW to enable W buffering (rarely used) or D3DZB_FALSE to disable Z buffering. To enable a Z buffer also see the Z buffer page. D3DRS_ZWRITEENABLE - you can turn on or off the writing of data to the Z buffer (TRUE or FALSE). Normally you want it enabled so that geometry is only rendered if it i..
시체가 죽었을 때 알파가 번져가면서 사라지는 효과 https://unionassets.com/blog/dissolve-shader-256
예전에 물을 구현할 때 물 표면에 반사되는 씬을 clipping할때 사용 void NearClipPlane::ClipProjectionMatrix(D3DXMATRIXA16 & matView, D3DXMATRIXA16 & matProj, D3DXPLANE & clip_plane, LPDIRECT3DDEVICE9 pd3dDevice) { D3DXMATRIXA16 matClipProj; D3DXMATRIXA16 WorldToProjection; WorldToProjection = matView * matProj; // m_clip_plane is plane definition (world space) D3DXPlaneNormalize(&clip_plane, &clip_plane); D3DXMatrixInver..
X축으로 1/2로 스케일링을 한다고 했을 때 가운데 그림처럼 normal vector가 변형이 되어진다. normal vector는 한 면에서 수직인 벡터를 말하는데 그 값이 scale되어 방향서이 달라지게 된다. 정상적으로 Normal을 구할려면 WorldMatrix에 역행렬 - 전치행렬을 하면 된다. 쉐이더등에 행렬을 넣을 때 모든 행렬을 전송하는게 아니기 때문에 world행렬 등만을 전달한다. world matrix에는 위치, 스케일, 회전의 값이 들어 있다. 위의 그림은 스케일이 적용 되어 있다. 행렬에는 scale과 rotation의 정보가 들어 있는데 scale만을 뽑아 내기 못하기 때문에 행렬에 역행렬을 구해야 한다. z축 회전 행렬 회전 행렬을 만큼 뒤로 돌리면 역행렬이 된다. 는 0을 기..