Version Maximum number of instructions
1_1 128
2_0 256
2_0 Extended 256. The number of instructions that run can be much higher because of looping.
3_0 512 minimum, and up to the number of slots in the D3DCAPS9.MaxVertexShader30InstructionSlots.


Version 1_x

New instructions :
- Setup instructions : dcl, def, vs
- Arithmetic instructions : add, dp3, dp4, dst, lit, mad, max, min, mov, mul, nop, rcp, rsq, sge, slt, sub
- Macros : exp, frc, log, m3x2, m3x3, m3x4, m4x3, m4x4

Version 2_0

New instructions :
- Setup instructions : defb, defi
- Arithmetic instructions : mova
- Macros : abs, crs, expp, logp, lrp, nrm, pow, sincos, slt
- Static flow control instructions : call, callnz, else, end, endif, endloop, endrep, if, label, loop, rep, ret

New registers - constant float, constant integer, constant Boolean, loop counter

Version 2_0 Extended

New features( with a cap set ) :
- Dynamic flow control instructions : break, breakc, ifc
- Predication : setp instruction, p# regiter
- Static flow control nesting depth
- Number of temporary registers

Version 3_0

New features :
- Static flow control instructions : break, breakc, ifc
- Predication : setp instruction, p# register
- Number of temporary registers
- Indexing registers
- Vertex textures : texId texture address instruction
- Vertex stream frequency

출처 : MSDN
728x90
1)
char s[] = "Hi Mom";
const char* ptr = s;

ptr이 가리키는 곳의 내용을 바꾸는 것은 불가능 하지만 ptr의 내용을 바꾸는 것은 가능하다.

ptr[1] = 'o'; // ERROR

ptr = "Hi Dad"; // OK

2)
char s[] = "Hi Mom";
char * const ptr = s;

ptr이 가리키는 곳의 내용을 바꾸는 것은 가능하지만 ptr의 내용을 바꾸는 것은 불가능 하다.

ptr[1] = 'o'; // OK

ptr = "Hi Dad"; // ERROR

P.S. const char *와 char const *는 같은 내용으로 인식된다.

참고 자료
Object-Oriented Programming in C++, Richard Johnsonbaugh, Martin Kalin, PRENTICE HALL
728x90
모 회사 면접 보고 왔다.

실무/팀 면접을 완전히 망한거 같다. 너무 안일하게 생각하고 있었던거 같다.

면접 때 나온 문제들 다시 확인해보고 다른 회사 찾아봐야겠다.

일단은 쉬어야겠다.
728x90
* 변경
- texture 파일 형식을 dds로 변경하고 mipmap 적용
- effect 파일 확장자를 fx로 변경

* 추가
- BMP 형식도 맵으로 사용할 수 있게 기능 추가

* 버그 수정
- Map Editor에서 patch 크기가 5를 넘어가면 material 설정이 되지 않아 texture 색깔이 다르게 보이던 문제 수정
- Map Editor에서 Grid에 대한 IndexBuffer의 크기가 실제보다 작아서 heap이 깨지던 문제 수정










728x90
* 맵을 bmp format을 읽을 수 있게 변경
* texture를 dds format으로 변경하고 mipmap 사용
* vertex shader를 fx format으로 변경
728x90
- MapPatch를 그리는 방법을 DrawIndexedPrimitiveUP을 사용하는 방식에서 Index/VertexBuffer를 사용하는 방식으로 변경( 300FPS 정도로 성능 향상 )
- terrain texture 추가










728x90
해탈한 듯한 읊조리는 랩이 돋보이는 "花鳥風月"라는 노래를 통해 알게된 케츠메이시의 이번 싱글 사쿠라는 샤방한 봄의 사쿠라 아래에서 과거를 회상하면서 드는 약간의 쓸쓸한 느낌을 잘 살린 노래인거 같다. 반주와 후렴 부분이 마음에 든다.

P.S. 랩은 못 알아 들어서 아무 생각 없다.

728x90
* 100 FPS 이상의 속도( 300FPS 권장 )
* terrain texture mapping
* 주석을 보다 깔끔하게
728x90
일단은 포트폴리오 프로토 타입 공개.

skinned mesh를 이용해서 그린 캐릭터를 height map을 사용한 지형에서 이동시키는 프로그램.









위에 사용된 height map을 수정하는 프로그램.







P.S. 태터도 맘에 안들어 취직 되면 홈피부터 갈아엎어야지...-_-
728x90
Introduction to 3D Game Programming with DirectX 9.0
by Frank D. Luna

Direct X를 처음 접하는 나에게 Direct X SDK의 tutorial은 좌절스러웠다. 기본적인 삼각형 그리기, 광원 설정, 텍스쳐 입히기 다음에는 고급 기술들의 샘플들만 있어서 Direct X를 처음 접하는 나를 어디서 뭘 시작해야 할지 모르는 상태로 만들어 버렸다.

이런 상태에서 Skinned Mesh 관련 자료를 찾다가 알게된 MoonLab에서 저 책을 발견하게 되었다. Direct X를 써봤던 사용자라면 내가 모 출판사의 Visual C++ 책을 쓰레기 취급하듯이 이 책도 쓸모없다고 평가할지도 모른다. 하지만 Direct X에 대해서 모르는 사람이라면 이 책으로 시작하기를 권하고 쉽다.

책의 구성은

Part I Mathematical Prerequisites
Vector, Matrix, Transformation, Plane, Ray에 대해서 다루고 있다.

Part II Direct3D Fundamentals
Direct3D의 간단한 소개 및 구조, Drawing on 3D, Color, Lighting, Texturing, Blending, Stenciling

Part III Applied Direct3D
Fonts, Mesh, Camera, Terrain Rendering, Particle System, Picking

Part IV Shaders and Effects
Vertex Shader, Pixel Shader, Effects Framework

로 이루어져 있다.

Direct X SDK에는 각각에 대한 설명이 부족해서 아쉬웠는데 이 책을 통해 쉽게 배울 수 있어서 좋았다. 특히 shader 부분에서 많은 도움이 되었다.

P.S. shader 알고보면 쉽다. ㅠ_ㅠ
728x90

+ Recent posts