본문 바로가기

C++197

[Programmers] Lv 2. 땅따먹기 https://school.programmers.co.kr/learn/courses/30/lessons/12913 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr int solution(vector land) { int answer = 0; for(int i = 0; i < land.size()-1 ; i++){ land[i+1][0] += max(land[i][1],max(land[i][2],land[i][3])); land[i+1][1] += max(land[i][0],max(land[i][2],land[i][3])); land[i+1][2] += ma.. 2023. 7. 9.
[Programmers] (2019 KAKAO BLIND RECRUITMENT) Lv 2. 오픈채팅방 https://school.programmers.co.kr/learn/courses/30/lessons/42888 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include #include #include using namespace std; vector solution(vector record) { vector answer; unordered_map m; list li; stringstream ss; for (const auto& data : record) { ss.str(data); string command, us.. 2023. 7. 9.
[DirectX12 - Terrain] Chapter 03. Picking GitHub : https://github.com/developeSHG/DirectX12-Terrain/commits/03.Picking GitHub - developeSHG/DirectX12-Terrain: DirectX12 - Terrain DirectX12 - Terrain. Contribute to developeSHG/DirectX12-Terrain development by creating an account on GitHub. github.com picking에 대해서 알아보자. picking을 하려면 기본 개념부터 알아야한다. 보는 바와 같이 인게임에서 존재하는 물체들은 3D 세상에서 존재하는 것들이다. 근데 최종적으로 렌더링 파이프라인 과정을 거쳐서 보여주는 화면 자체는 사실 2D화면에 .. 2023. 7. 7.
[DirectX12 - Terrain] Chapter 02. Terrain GitHub : https://github.com/developeSHG/DirectX12-Terrain/commits/02.Terrain GitHub - developeSHG/DirectX12-Terrain: DirectX12 - Terrain DirectX12 - Terrain. Contribute to developeSHG/DirectX12-Terrain development by creating an account on GitHub. github.com 테셀레이션의 적용은 당연히 terrain에 적합하다. (먼 곳에 있는건 삼각형 하나, 가까이 있으면 무수한 삼각형의 개념이) 경우에 따라서, Terrain을 사용하지 않고, 메쉬로 만들어져있는 경우가 있다. 와우는 메쉬로 이루어져있다. 배그는 Ter.. 2023. 7. 7.
[DirectX12 - Terrain] Chapter 01. Tessellation GitHub : https://github.com/developeSHG/DirectX12-Terrain/commits/01.Tessellation GitHub - developeSHG/DirectX12-Terrain: DirectX12 - Terrain DirectX12 - Terrain. Contribute to developeSHG/DirectX12-Terrain development by creating an account on GitHub. github.com Tessellation 단계 - [홀 쉐이더 스테이, 테셀레이션 스테이지, 도메인 쉐이더 스테이지] Tessellation 자체도 지오메트리 쉐이더랑 비슷하게 정점을 추가하는 개념이다. 테셀레이션은 옵션단게였다. 여태까지 vertext sh.. 2023. 7. 7.
[Programmers] (2022 KAKAO BLIND RECRUITMENT) Lv 2. 주차 요금 계산 https://school.programmers.co.kr/learn/courses/30/lessons/92341 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include #include #include using namespace std; int time_diff(string in, string out) { int h1 = stoi(in.substr(0, 2)); int m1 = stoi(in.substr(3, 2)); int h2 = stoi(out.substr(0, 2)); int m2 = stoi(out.sub.. 2023. 7. 7.
[DirectX12 - Shadow Mapping] Chapter 01. Shadow Mapping GitHub : https://github.com/developeSHG/DirectX12-Shadow-Mapping/commits/main GitHub - developeSHG/DirectX12-Shadow-Mapping: DirectX12 - Shadow Mapping DirectX12 - Shadow Mapping. Contribute to developeSHG/DirectX12-Shadow-Mapping development by creating an account on GitHub. github.com 물체가 다른 물체의 위치에 의해서 그림자 영향을 받는 것. 여태까지 그리는 방식은 물체마다 개별적으로 그려지기 때문에 다른 물체가 내 앞에 있는지 판단할 길이 없었다. 빛을 기준으로 앞에 물체가 있.. 2023. 7. 7.
[Programmers] (힙(Heap)) Lv 2. 더 맵게 https://school.programmers.co.kr/learn/courses/30/lessons/42626 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include using namespace std; int solution(vector scoville, int K) { int answer = 0; priority_queue q; for (const auto& e : scoville) q.push(e); int first, second, result; while (true) { if (q.top() >= K) .. 2023. 7. 4.
[DirectX12 - Particle] Chapter 03. Instancing GitHub : https://github.com/developeSHG/DirectX12-Particle/commits/03.Instancing GitHub - developeSHG/DirectX12-Particle: DirectX12 - Particle DirectX12 - Particle. Contribute to developeSHG/DirectX12-Particle development by creating an account on GitHub. github.com 파티클 시스템을 다루면서 draw call 부하를 줄이기 위해 인스턴싱 이란 기법을 사용했었다. 지금까지 렌더링 파이프라인이 동작하는 원리를 살펴보면, Input Assembler 단계에서 Vertex buffer, Index Buff.. 2023. 7. 3.
[DirectX12 - Particle] Chapter 02. Particle System GitHub : https://github.com/developeSHG/DirectX12-Particle/commits/02.Particle_System GitHub - developeSHG/DirectX12-Particle: DirectX12 - Particle DirectX12 - Particle. Contribute to developeSHG/DirectX12-Particle development by creating an account on GitHub. github.com 만약 파티클을 그냥 기존에 했던 렌더링 파이프라인 방식대 렌더링한다면, 그 개수만큼 많은 부하를 잡아먹게 될 것이다. 파티클 자체가 어떤 특수 효과를 내기 위해서 사용하는 거지만, 사실 인게임적인 관점에서 볼 때 중요한 요소라.. 2023. 7. 3.