Shader and array


02-12-2014 10:10:25


I try to pass a big array of float to a pixel shader.

fragment_program CoordinateMapping_ps hlsl
source CoordinateMapping_ps.hlsl
target ps_2_0
entry_point main
param_named depthSpacePoints float4147200

But When i want to affect its value by coding i've an error (System.Runtime.InteropServices.SEHException)
fixed (float* depthSpacePointsDataTempPtr = depthSpacePointsDataTemp)
pass.GetFragmentProgramParameters().SetNamedConstant("depthSpacePoints", depthSpacePointsDataTempPtr, 4147200);

Is there somebody who know how i can do that ?



03-12-2014 22:21:31

I don't know much about shaders.

My suggestions:
* Have a look to the ogre.log file for specific warnings/errors.
* Search / ask in the Ogre main forum, because it could be an Ogre specific problem (independent of the Mogre wrapper). Use the warning/error message of the logfile for searching.

Unfortunately I can't do more for you.
Good luck.


04-12-2014 07:29:27


I don't found a example in the ogre forum (elsewhere neither), but i found an other solution without shader.
Thanks for your response.