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

ClearUnorderedAccessViewFloat not work properly

$
0
0

Hey Guys,

 

I have ClearUnorderedAccessViewFloat always clean my UAV (float4 StructuredBuffer) to all zeros no matter what value I passed to it.

...
FLOAT ClearVal[4] = {0.1f, 0.2f, 0.3f, 0.4f};
m_CommandList->ClearUnorderedAccessViewFloat(GpuVisibleHandle,
        Target.GetUAV(), Target.GetResource(), ClearVal, 0, nullptr);
...

The UAV get cleaned all to zero, so resource bind should be correct...Please let me know if I did something stupid...

Also MSDN state "For floating-point inputs, the runtime will set denormalized values to 0 (while preserving NANs)." does that means for float clear value it has to be inside [0.f, 1.f]?

 

Thanks


Viewing all articles
Browse latest Browse all 17560

Trending Articles



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