Programing 공부 5

Bloom

Bloom의 다양한 문제점 화면 전체의 밝기에 따라 임계값의 올바르지 못하면 Bloom Flower와 같은 너무 과도하게 밝아지는 현상이 생긴다.Bloom Disasters - The Quixotic Engineer (gangles.ca) Bloom Disasters - The Quixotic EngineerBloom is a shader effect used to simulate the real appearance of very bright light. While it was once considered too hardware intensive for real-time gaming, modern systems with HDR rendering make frequent use of it. So frequ..

데이터 읽고 쓰기

도형들을 복셀화한다음 복셀정보를 텍스처에 기록하던 도중 다음과 같이 하고있었다. 그런데 UAV에 데이터를 읽고 쓰기하는 작업이 오버헤드가 읽어날 경우 많이 느린것을 깨달았다. [numthreads(4, 4, 4)] void main(uint3 DTid : SV_DispatchThreadID) { uint3 _id = DTid * 2; [unroll(8)] for (uint i = 0; i > 1; _temp.z = (i && 4u) >> 2; uint3 _wirtePos = _id + _temp; uint _id = Flatten3D(_wirtePos, v..

Programing 공부 2023.05.26

SIMD (1)

SIMD는 병렬처리의 한 종류로, 하나의 명령어로 여러 개의 값을 동시에 계산하는 방법이다. 벡터나 행렬과 같은 다량의 데이터를 계산하는데 유리하기에 그래픽스를 처리하기에 유리하다. struct Vector4 { union { float x, r; }; union { float y, g; }; union { float z, b; }; union { float w, a; }; Vector4() = default; Vector4(const Vector4&) = default; }; inline Vector4 __vectorcall operator+ (Vector4 V1, Vector4 V2) { Vector4 result; result.x = V1.x + V2.x; result.y = V1.y + V2.y;..