GLES doesn’t support one dimensional textures (which I needed).
No problem there, I simply pass my N values as [N,1] texture (=2D).
But GLES doesn’t seem to like 3d textures either. When I tried
passing my 3d texture with dimensions WxHxD as 2d texture [W,H*D]
unity complains that the textures width/height is off the charts. (e.g. 128x65k)
Should this (at least in theory) be possible? Is there any other way to
throw some bigger chunks of data into the readable realm of my fragshader?
I think you didn’t get my point here…: my 3d texture is 128x256x256 bytes (=8Mb). Since GLES 2.0 has no sampler3D (search the spec) I thought something like:
If I can’t pass 8Mb as 3d texture, maybe I can simply put the slices one after each other and pass a 128x65536 texture
(128x(256*256) == still 8Mb)
To be honest, for my use case 128x256x256 is already a very reduced dataset.
What I’ve found out thus far is that GLES really likes NPOT textures (which I’ve got)
and it gives you the possibility to get the max texture resolution (see here). Mozilla says the limit should be at least 2o48 squared, which would be 4Mb.
Is there any other way than textures to pass big chunks of (readonly) memory to a fragment shader?
This sounds exactly like what i was looking for. Big up!
EDIT: after 2 minutes of reading: Leandro does exactly what i tried (concat all slices of the 3d texture into one image/2d-texture) but I think the doesnt put them all next to one each other in the same direction but lay them out more intelligent.