- Geometry Pass
Depth(xy), Normal(xy) Geometry Buffer(이하 G-Buffer) 저장 - Light Properties Pass
아래 최종 색상 식에 미리 계산된 항목을 Light Buffer(이하 L-Buffer)
최종 색상 = Ambient + Shadow * Att * (N.L * diffuseColor * diffuseIntensity * diffuseLightColor + R.V^n * specularColor * specularIntensity * specularLightColor )
Light Properties
- N.L
- LightColor (Diffuse, Specular)
- R.V^n
- Attenuation
Light Texture(A8R8G8B8 format)
- Channel 1 : diffuseLightColor.r * N.L * Att
- Channel 2 : diffuseLightColor.g * N.L * Att
- Channel 3 : diffuseLightColor.b * N.L * Att
- Channel 4 : R.V^n * N.L *Att
아래는 관련 Shader Code 입니다.half4 ps_main( PS_INPUT Input ) : COLOR
{
half4 G_Buffer = tex2D( G_Buffer, Input.texCoord );// Compute pixel position
half Depth = UnpackFloat16( G_Buffer.zw );
float3 PixelPos = normalize(Input.EyeScreenRay.xyz) * Depth;// Compute normal
half3 Normal;
Normal.xy = G_Buffer.xy*2-1;
Normal.z = -sqrt(1-dot(Normal.xy,Normal.xy));// Computes light attenuation and direction
float3 LightDir = (Input.LightPos – PixelPos)*InvSqrLightRange;
half Attenuation = saturate(1-dot(LightDir / LightAttenuation_0, LightDir / LightAttenuation_0));
LightDir = normalize(LightDir);// R.V == Phong
float specular = pow(saturate(dot(reflect(normalize(-float3(0.0, 1.0, 0.0)), Normal), LightDir)), SpecularPower_0);float NL = dot(LightDir, Normal)*Attenuation;
return float4(DiffuseLightColor_0.x*NL, DiffuseLightColor_0.y*NL, DiffuseLightColor_0.z*NL, specular * NL);
} - Geometry-2 Pass
G-Buffer와 L-Buffer에 값을 가지고 최종 색상을 계산
아래는 관련 Shader Code입니다.float4 ps_main( PS_INPUT Input ) : COLOR0
{
float4 Light = tex2D( Light_Buffer, Input.texCoord );
float3 NLATTColor = float3(Light.x, Light.y, Light.z);
float3 Lighting = NLATTColor + Light.www;return float4(Lighting, 1.0f);
} - Forward Rendering
Translucency Objects Rendering(back to front)
1. Bitnami 매니저 툴에서 phpMyAdmin으로 접속해서 해당(bitnami_redmine) 데이터베이스를 내보내기합니다(MySQL dump로 자동화 해도 됩니다). 2. \apps\redmine\htdocs\files 폴더에 있는 파일을 압축하여 별도 보관합니다. ** 아래는 참조 내용입니다. 원본 웹사이트 주소 : http://redkim14.blogspot.kr/2016/05/redmine.html Redmine - 레드마인 데이터 백업 및 복원 * Bitnami Redmine 2.6.x 버전을 기준으로 합니다. * 백업 - 레드마인 설치 폴더로 이동 - apps/redmine/htdocs/config/database.yml 파일을 메모장으로 열어 database, username, password 내용을 확인 합니다. - 레드마인 설치 루트 폴더에서 use_redmine.bat 실행합니다. - 커맨드 창에서 mysqldump -u [username] -p [database] > redmine_backup.sql을 입력하고 엔터를 치고 password를 입력합니다. - redmine_backup.sql 파일로 데이터 베이스가 백업됩니다. - \apps\redmine\htdocs\files 폴더에 있는 파일을 압축하여 별도 보관합니다. * 복원 - 레드마인 설치 후 설치 폴더로 이동 합니다. - 데이터 베이스 백업 파일을 레드마인 루트 폴더에 복사합니다. - \apps\redmine\htdocs\files 폴더에 별도 압축한 파일을 풀어 복사합니다. - apps/redmine/htdocs/config/database.yml 파일을 메모장으로 열어 database, username, password 내용을 확인 합니다. ...
댓글
댓글 쓰기