Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Set constant buffer for pixel shader only

$
0
0
Hi everyone, I porting a project from DX11 to DX12. - In Dx11,we can set the constant buffer for each shader by using : VSSetConstantBuffer, PSSetConstantBuffer. But in Dx12 I am using SetGraphicsRootConstantBufferView, as I know it will set constant buffer for both VS and PS, am I right? - For example, my project is using 5 constant buffers: A,B,C,D,E. The VS use 3 const buffer A,B,C and PS use A, D,E - So how to port it to DX12 correctly ? SetGraphicsRootConstantBufferView(0 -> 4, A -> E) seems ok would PS know to match D E in right position? Thank you

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>