Render (DX11 TempTarget) to writer makes whiter images

Hi,

I’ve go one tiny, but problematic bug in DX11. After using render tempTarget, writer writes whiter image than it was before. See attached file.

Anybody knows?
(I would like to dynamically change resolution, that’s why tempTarget)
Normal render works, but it has no backBufferSize.

Thanks.
Martin

whiterImage.v4p (5.1 kB)

it’s somehow compensated if I use Saturation 1.5 and Contrast 1, but that’s not the way it should work ;)

Ah, that could be the writer does SRGB color space, I’ll have to look into SlimDX for that tho (I had the issue but the other way round).

a bit late…

@vux can you be more specific on what is needed to be done? as i see, the writer just calls SaveTextureToFile() and there seems no way to influence the colorspace without recompiling slimdx.

I figured writer only does this on float textures. R8G8B8A8_UNorm or same_SRGB textures are written with right colors

problem is, that i’m unable to write a R16G16B16A16_UNorm at all (as Tiff). this throws:

00:03:23 ERR : SlimDX.Direct3D11.Direct3D11Exception in SlimDX: E_FAIL: An undetermined error occurred (-2147467259)

Stacktrace:
   at SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
   at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
   at SlimDX.Direct3D11.Resource.SaveTextureToFile(DeviceContext context, Resource resource, ImageFileFormat destinationFormat, String desintationFile)
   at VVVV.DX11.Nodes.WriterTextureNode.Evaluate(Int32 SpreadMax)

And, when writing a R32G32B32A32_Float as Tiff, which works, the written image is a R8G8B8A8_UNorm though.

So, i guess SaveTextureToFile() converts everything into R8G8B8A8_UNorm. (Also converts R8G8B8A8_UNorm_SRGB to R8G8B8A8_UNorm which also leads to much lighter colours.

Ah, and SlimDx’s SaveTextureToFile() just calls D3DX11SaveTextureToFile() :(

And microsoft states: D3DX11_IFF_DDS is the preferred format since it is the only option that supports all the formats in DXGI_FORMAT.

… ba-dumm

i made another writer that doesn’t have this problem. works/tested with R16G16B16A16_UNorm.

it only works if you copy some dlls https://discourse.vvvv.org/

@@vux: i’m curious what your plans with Feraltic-SDX are? i’m far away from understanding everything from dx11-vvvv but have the feeling that SharpDX has quite some advantages over SlimDX. also i think it is more straightforward and so easier to understand.