Hello all !!
playing with shaders, my v2f structure gets bigger and bigger and… it appears it’s now too big and cannot compile anymore :shock:
here it is:
** struct v2f {**
** V2F_POS_FOG;**
** float3 ref;**
** float2 bumpuv[2];**
** float4 viewDirZ;**
** LIGHTING_COORDS**
** float3 uvK;**
** half2 uv2;**
** half3 ld;**
** half3 vd;**
** };**
Everything works fine till i want to access vd in
vertex module with someting like: o.vd = 10;
compiler says :
Cg in program ‘vert’: error C5041: cannot locate suitable resource to bind parameter “vd” at line 88
I tried to change some floats to halves but with no luck ![]()
Finally it mostly appears that the compiler has reached his struct number of members limit instead of any max structure size limit.
On the other hand console message are almost unusefull, saying error comes frome here or there…
line numbers are totally erratic. is there a way to solve this bug ? In the present case, line 88 is a comment :lol:
Thnaks a lot for your answers and have a nice day
![]()