Quantcast
Channel: Question and Answer » hlsl
Viewing all articles
Browse latest Browse all 69

Update single variable in DirectX Shader

$
0
0

I am trying to update a single variable within a CBuffer but I am unsure of how to do this.

I have a LightingBuffer which is passed to the GPU containing, ambient color, diffuse color etc and I want to be able to update the specularPower component of this CBuffer but not the rest.

In openGL I could just do glUniform1f and update it, however I cannot do this is DX / HLSL

How would I go about doing this?


Viewing all articles
Browse latest Browse all 69

Trending Articles