ID3D11Multithread::SetMultithreadProtected 예제도 없고, Device 호출은 thread safe 라더니 그냥은 아니고 저거 호출하면 된다네 당연히 cost 존재 ID3D11Multithread::Enter, Leave 순서까지 보장하려면 이 안에서 써라는데, 머 상관없다 ID3D11Fence interface Represents a fence, an object used for synchronization of the CPU and one or more GPUs. This interface is equivalent to the Direct3D 12 ID3D12Fence inteface, and is also used for synchronization between D..
Dx12를 Dx11로 포팅 중이다 시대에 역행하는 중 엔진을 첨부터 만들려고 했는데 왠지 점점 구조가 더러워져서 이것 저것 빼끼다 보니 그냥 아예 옮겨 적는듯 아예 포팅하자고 마음 먹자 마자 엄청 좋아보이던 구조에서 어째 단점이 자꾸 눈에 뛴다 ColorBuffer, DepthBuffer는 비슷한 구조로 잘써먹었던거라 빨리 마무리 해야되는데 좀 시간이 걸리고 있다 CommandList, Context 는 DX11와 아예 다른거라 생각좀 해봐야 할듯 Deffered Context라고 있는데 안써봐서; 참고자료는 Hierography에 Deffered Context, Immediate Context 관련 내용이 설명되어 있는데, 다른 장과 유사하게 거의 도움이 안된다. 마지막 장에 Dual Paraloid ..
영어론 검색하니 자료가 넘 많아서 어찌해야할지; 2011 엔 아예 책이 있네 Real-time shadows 라고 2008 GDC http://gamedevs.org/uploads/advanced-soft-shadow-mapping-techniques.pdf 2006 GDC https://developer.amd.com/wordpress/media/2012/10/Isidoro-ShadowMapping.pdf http://codeflow.org/entries/2013/feb/15/soft-shadow-mapping/ The GPU Gems series by nvidia also has a wealth of shadowing information (freely available online) GPU Gems..
머든 한번에 끝나는게 없네 몇시간째 디버깅하는 것인가 output.ShadowPosH = mul( float4(input.Pos, 1.0), mul(g_World, g_ShadowTransform)); Shadow Map 과 비교를 위해선, Light 의 View, Proj 을 곱해주고 그걸 texture 좌표로 환산한다 그런데, 환산이 이루어 지는 base 좌표계는 World 좌표계이다. World 에 Light가 있으니, World 로 환산할 때 scale 을 50 씩 주는데 없으니까 완전 해석하기 힘든 결과만 나와서 찾기 힘들었다 float lightDepth = tShadowMap.SampleLevel(ShadowSamplerTest, shadowPosH.xy, 0).r; return depth ..
Cubemap reflection 을 구현하였다 refract 1.0 refract 0.8 잘되는 것 같은데 머가 문제인가? Luna에서는 위치정보가 빠져있기 때문에 평평한 표면에서는 잘 통하지 않는다고 한다. 정확히 말하자면, "Accurate Environment Mapped Reflections and Refractions by Adjusting for Object Distance" [Brennan02] 에는, "This artifact is worse the closer reflected objects are relative to the viewer. The same artifact appears when using a refraction vector as opposed to a reflectio..
근대 바닥이 검정색은 말이 안되는데; 문제 찾아 삼만리 전에는 살짝만 검색하면 나오던 SSAO 구현들이 지금은 검색해도 나오지도 안는다 ^^ VS_OUTPUT GeometryVS( VS_INPUT input ) { VS_OUTPUT output; output.HPosition = mul( float4(input.Pos,1), g_WorldViewProjection ); output.PositionV = mul( input.Pos, (float3x3)g_WorldView ); output.NormalV = mul(input.Pos, (float3x3)g_WorldView); return output; } 으아, Normal에 Pos를 넣었는데도 먼가 있어보이는 결과를 내준 구현에 감사를 NdcDepthTo..
머냐 이건, Nvidia의 모델을 갸져와서 비교해야지 했는데; SSAO11의 bin 파일엔 normal 이 없다; 어떻게 한지 신기하기도 하지만, 비교 모델이 사라졌다 GetLinearDepthTexture() GetColorSRV() 이러면 Light에 반영은 어떻게 하는거지? float4 Blur_Composite_PS11( PostProc_VSOut IN) : SV_TARGET { float ao = tAO.Sample(PointSampler, IN.uv); return pow(ao, g_PowExponent); } BlendStateDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_ZERO; BlendStateDesc.RenderTarget[0].DestBlend = ..
cbuffer cbPerFrame { float gTexelWidth; float gTexelHeight; bool gHorizontalBlur; }; bool 은 32 bit 이다. 놀랍게도. https://gamedev.stackexchange.com/questions/22600/why-cant-i-get-a-bool-packed-and-aligned-into-a-d3d-constant-buffer 답글에 32 bit int 랑 같다고 적혀있어서 먼 약먹었나 했는데; Reflection API로 조사해온 결과 진짜 4 byte 이다 결국 int 를 bit flag로 조사하거나, http://theinstructionlimit.com/encoding-boolean-flags-into-a-float-in..
Luna's Dx11 의 SSAO가 괜찮은 introduction 이다. 명확하고 인터넷 튜토리얼에서 보이는 잘못된 수식 혹은 설명 빠진 건 없다 문제는 Sample point 가 정육면체의 각 꼭지점 및 중점으로 17개로 고정되어 있다는 것 그리고 나머지 세팅은, blur는 1x1 blur 를 multi pass (3 pass) random kernel 이 128x128 semi sphere 로 sampling point 를 구하는데 reflection 으로 고정 된 sampling point 를 회전시키고 만약 face normal 과 반대 방향으로 바라보고 있다면 반대방향으로 돌린다 그리고 view space normal 과 depth를 F16F16F16F16 texture에 저장하여 쓴다 ..
- Total
- Today
- Yesterday