Closed profelis closed 11 years ago
This is because when you read a matrix or vector, you might modify its components without having to set it back.
Very bad :( Now I can't do somthing
if (sdr.vec[0] != 1) sdr.vec = new Vector3D(1,1,1,1);
without call modified=true;
I made a small change, it nows only set modified is the value is defined, so you can do: if( sdc.vec != null ) sdr.vec = new Vector3D(1,1,1,1); Only for parameters (conditional ones)
Thanks :)
btw, add more docs about consts and params
Will do when I have some time :) I have updated http://haxe.org/manual/hxsl but it's not yet complete.
Ok, took some time to write it quickly while I was at it ;) http://haxe.org/manual/hxsl?lang=en#hxsl-shader
why here https://github.com/ncannasse/hxsl/blob/master/hxsl/ShaderMacros.hx#L272 getter set modified=true; ?