Code: Select all
uniform vec4 WaveData[5];
so in my opinion,i must declare like:
Code: Select all
uniform matrix4 waveData1;
uniform vector4 waveData2;
if there are some good methods to set array constants out of my view?
Thanks
Code: Select all
uniform vec4 WaveData[5];
Code: Select all
uniform matrix4 waveData1;
uniform vector4 waveData2;
Code: Select all
GLSL
uniform vec4 waveData[5];
irrlicht
f32 waveData[20] = {0.766f,0.643f,200.0f,2.0f,
0.174f,0.985f,240.0f,2.4f,
-0.985f,0.174f,184.0f,1.82f,
-0.643f,-0.766f,120.0f,1.2f,
0.174f,-0.985f,160.0f,1.6f};
services->setVertexShaderConstant("waveData",waveData,20);