Texture3D size

Trying to use a Texture3D to visualise a galaxy generator I am writing

The problem is I was going to use a Texture3D and ray trace it, but the maximum width and height allowed appears to be 256 by 256, which is about as useful as a handbrake on a canoe.

Anyone know why?

 SharpDX.SharpDXException
 HResult=0x80070057
  Message=HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.

  Source=SharpDX
  StackTrace:
   at SharpDX.Result.CheckError()
   at SharpDX.Direct3D11.Device.CreateTexture3D(Texture3DDescription& descRef, DataBox[] initialDataRef, Texture3D texture3DOut)
   at Microsoft.Xna.Framework.Graphics.Texture3D.CreateTexture()
   at Microsoft.Xna.Framework.Graphics.Texture3D.PlatformConstruct(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Int32 depth, Boolean mipMap, SurfaceFormat format, Boolean renderTarget)
   at Microsoft.Xna.Framework.Graphics.Texture3D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Int32 depth, Boolean mipMap, SurfaceFormat format, Boolean renderTarget)
   at Microsoft.Xna.Framework.Graphics.Texture3D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Int32 depth, Boolean mipMap, SurfaceFormat format)
   at GalaxyGenerator.Game1.Initialize() in 
C:\Research\Monogame\GalaxyGenerator\GalaxyGenerator\Game1.cs:line 57
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Microsoft.Xna.Framework.Game.Run()
   at GalaxyGenerator.Program.Main() in 
C:\Research\Monogame\GalaxyGenerator\GalaxyGenerator\Program.cs:line 18

Is the graphics profile set to HiDef?

256x256x256 is 16.7M pixels, 3D textures of 1/4 of that size are used to generate these volumetric clouds: https://new-cdn.80.lv/upload/content/d0/5d2dd56351580.jpg

So just that we are clear regarding usability of 3d textures at that resolution. Anyway, as Markus said, make sure you use HiDef profile, I know for fact that 2048x2048 width / height 3D textures and Render targets are usable (obviously with very low depth/height).

So I have written a tool that lets you create a galaxy layout.

So you add spiral arms, bars, core region, etc

Run dither and blur filters

And the end result is a 512 by 512 texture with type Single to use as a star density function for the galaxy.

I then generate a new set of textures 512 by 512 from this texture to represent the star density above and below the galactic plane.

The best way to use this is as a Texture3D , so I tried to generate one 512 by 512 by 16 and it failed

It failed even if I changed it to 512 by 512 by 1 or changed the format to Alpha8

I checked the graphics profile was HiDef, then gave up and asked here

Now I have come back to it , it did not work the first three times I ran it.

I then swapped to a release build, still failed

Went back to a debug build and changed the display resolution of the app from full screen to 1800 by 1000

Now works

To make things worse, I went back to 1920 by 1080 and it still works

No idea what the hell is going on, but it is now working so I will run away and leave it alone

If anyone has a clue why that would fix the problem, for the sake of my sanity , please let me know