Outputting a float texture from a dynamic plugin

hello vvvvriends,

does anybody by chance know if it is possible to output a float texture from a dynamic plugin and provide some hint on how to do it? could be quite handy to efficiently control dottores awesome particlesgpu-shader-library with an cpu simulation…

cheers,
m4d

that should work with the Template (EX9.Texture) like:

protected override Texture CreateTexture(int Slice, Device device)
		{
			FLogger.Log(LogType.Debug, "Creating new texture at slice: " + Slice);
			return new Texture(device, Math.Max(FWidthIn[Slice](Slice), 1), Math.Max(FHeightIn[Slice](Slice), 1), 1, Usage.None, Format.A32B32G32R32F, Pool.Managed);
		}
		
		protected unsafe override void UpdateTexture(int Slice, Texture texture)
		{
			FCurrentSlice = Slice;
			//put data in texture
		}

thanks tonfilm! that was what i was looking for.
sorry for getting back to this so late ;)

still struggling a bit with the part below.

//put data in texture

doing my homework on the BitConverter should fix that though…

Hello,

regarding the answer to this question, I have one other question.

protected override Texture CreateTexture(int Slice, Device device)

tells me it can’t override this method, only when I remove the slice parameter this is possible.

protected override Texture CreateTexture(Device device)

will work for me… (same with UpdateTexture)

So is it possible that the answer is not entirely correct at this time? (but hopefully in future we will get the possibility to output a spread of textures)

yes, sorry. you are right, thats already the code for the next version. there you can call a method SetSliceCount in Evaluate which sets the slicecount of the texture output pin…