강의

멘토링

커뮤니티

Inflearn Community Q&A

smfgkgks1231739's profile image
smfgkgks1231739

asked

[Game Programmer Jump-Start Class] Introduction to DirectX11

StructureBuffer

ComputeShader로 ParticleSystem 구현 관련해서 질문이 있습니다

Written on

·

410

1

DX12 강의에 있던 방법과 같이

ParticleSystem을 컴포넌트로 만들고, FinalTick에서

Compute Shader로 StructuredBuffer를 전해줘서 계산하고,

Render 단계에서, FinalTick에서 전해줬던 StructedBuffer를 다시 던져 그리는 방식으로 만들었는데,

m_pShader->GetSRV .... 부분에서 Effects11: ID3DX11EffectVariable::AsShaderResource: Invalid typecast 이런 오류가 뜹니다.

RWStructuredBuffer라서 그런가 싶은데, 그럼 Input용으로 던져줄 StructuredBuffer<> 와 Output용으로 던져줄 RWStructuredBuffer를 따로 선언해서 채워줘야 하는건가요?

 

c++directx

Answer 1

0

smfgkgks1231739님의 프로필 이미지
smfgkgks1231739
Questioner

해결했습니다

UAV만 던져주고 Dispatch 후에 Copy_FromOutput , Copy_ToInput 해줬더니 되네요

smfgkgks1231739's profile image
smfgkgks1231739

asked

Ask a question