본문 바로가기

C++197

[DirectX12 - Rendering] Chapter 03. Deferred Rendering GitHub : https://github.com/developeSHG/DirectX12-Rendering/commits/03.Deferred_Rendering GitHub - developeSHG/DirectX12-Rendering: DirectX12 - Rendering DirectX12 - Rendering. Contribute to developeSHG/DirectX12-Rendering development by creating an account on GitHub. github.com 저번 시간에 공부했듯 포워드 렌더링과 디퍼드 렌더링 차이 중 가장 큰 특징이자 단점은 포워드 렌더링이 모든 물체가 그 pointlight와 영향을 주는지 안주는지 모른채 모두다 연산해야된다는 단점이 있었다. 결론.. 2023. 6. 28.
[DirectX12 - Rendering] Chapter 02. Render Target GitHub : https://github.com/developeSHG/DirectX12-Rendering/commits/02.Render_Target GitHub - developeSHG/DirectX12-Rendering: DirectX12 - Rendering DirectX12 - Rendering. Contribute to developeSHG/DirectX12-Rendering development by creating an account on GitHub. github.com 우리가 여태 사용하고 있던 쉐이더 방식은 forward 쉐이더 였다. 우리가 지금까지 한 렌더링 파이프라인은 물체를 그릴 때, 버텍스와 인덱스 정보를 넣어주고 쉐이더를 통해서 어떤 일을 해야할지 기술해준 다음에 버텍스 쉐.. 2023. 6. 26.
[Programmers] (2022 KAKAO BLIND RECRUITMENT) Lv 2. k진수에서 소수 개수 구하기 https://school.programmers.co.kr/learn/courses/30/lessons/92335 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include using namespace std; bool IsPrime(long param) { for (int i = 2; i 1); } int solution(int n, int k) { int answer = 0; string str = ""; while (n) { int temp = n % k; if (temp) str = to_string(temp) .. 2023. 6. 26.
[Programmers] (해시) Lv 2. 전화번호 목록 https://school.programmers.co.kr/learn/courses/30/lessons/42577 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include using namespace std; bool solution(vector phone_book) { bool answer = true; sort(phone_book.begin(),phone_book.end()); for (int i = 0; i < phone_book.size() - 1; ++i) { if (phone_book[i] == phone_.. 2023. 6. 26.
[DirectX12 - Rendering] Chapter 01. 직교 투영 GitHub : https://github.com/developeSHG/DirectX12-Rendering/commits/01.%EC%A7%81%EA%B5%90_%ED%88%AC%EC%98%81 GitHub - developeSHG/DirectX12-Rendering: DirectX12 - Rendering DirectX12 - Rendering. Contribute to developeSHG/DirectX12-Rendering development by creating an account on GitHub. github.com 원근투영은 절두체 직교투영은 직사각형 형태 직교투영은 깊이값은 상관이 없다. 어떤 깊이값이던 간에 그 사이즈 그대로 나타난다는 특징이 있다. 영향을 받지 않는다. 고정된 화면을 .. 2023. 6. 24.
[DirectX12 - Camera & Lighting] Chapter 06. Frustum Culling GitHub : https://github.com/developeSHG/DirectX12-Camera_Lighting/commits/06.Frustum_Culling GitHub - developeSHG/DirectX12-Camera_Lighting: DirectX12 - Camera & Lighting DirectX12 - Camera & Lighting. Contribute to developeSHG/DirectX12-Camera_Lighting development by creating an account on GitHub. github.com 렌더링하기까지 했던것을 살펴보면 Input Assemembly 에서 콘텍스트 버퍼와 버텍스 정보를 세팅하고, 버텍스 쉐이더에서 각 버텍스를 변환한다.(행렬,.. 2023. 6. 23.
[DirectX12 - Camera & Lighting] Chapter 05. Skybox GitHub : https://github.com/developeSHG/DirectX12-Camera_Lighting/commits/05.Skybox GitHub - developeSHG/DirectX12-Camera_Lighting: DirectX12 - Camera & Lighting DirectX12 - Camera & Lighting. Contribute to developeSHG/DirectX12-Camera_Lighting development by creating an account on GitHub. github.com Skybox는 월드좌표가 필요없다. 왜냐하면 플레이어가 움직여서 skybox 밖으로 벗어나면 안되기때문이다. 그럼 월드 스페이스의 srt에서 s와t를 제외한 r(rotati.. 2023. 6. 23.
[DirectX12 - Camera & Lighting] Chapter 04. Normal Mapping GitHub : https://github.com/developeSHG/DirectX12-Camera_Lighting/commits/04.Normal_Mapping GitHub - developeSHG/DirectX12-Camera_Lighting: DirectX12 - Camera & Lighting DirectX12 - Camera & Lighting. Contribute to developeSHG/DirectX12-Camera_Lighting development by creating an account on GitHub. github.com cube를 보면 각 버텍스 별로 노말벡터들이 동일하다.(어떻게 보면 면은 같은 곳을 바라보니 동일한 건 맞는얘기) 그러다보니 버텍스 쉐이더에서 계산해준 값을 .. 2023. 6. 22.
[Programmers] (깊이/너비 우선 탐색(DFS/BFS)) Lv 2. 타겟 넘버 https://school.programmers.co.kr/learn/courses/30/lessons/43165 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include using namespace std; int dfs(const vector& numbers, const int& target, int order, int res, int answer) { if (order >= numbers.size()) return (res == target) ? answer + 1 : answer; answer = dfs(numbers, tar.. 2023. 6. 22.
[Programmers] (완전탐색) Lv 2. 피로도 https://school.programmers.co.kr/learn/courses/30/lessons/87946 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include using namespace std; int dfs(int& k, vector& dungeons, int idx, int answer, vector& visit) { k -= dungeons[idx].back(), visit[idx] = true; int res = answer; if (answer == dungeons.size()) return res; for (.. 2023. 6. 16.