Sprite Random Brush. Output in random a collection of sprite from a unique texture source. Each sprite should be placed in a regular grid. You can specify the size of the grid direcly in the Brush Parameter.
Re: Sprite Random
Posted: 20 Oct 2020, 08:10
by u2bleank
this time with a color parameter
Re: Sprite Random
Posted: 29 Mar 2021, 22:39
by neurolinked
Hi, i'm playing with the BSL language, in particular with the shaders 'spriteblitter' attacched to this Sprite brush. I have tried to force minimum and manimum for the input parameter and to fix a problem with the fixed parameter highlighted in the code.
Here's the code
cfg{ name = "spriteblitter_2"; samplerDefault; { filter = point ; adressU = clamp ; adressV = clamp ; } }
int rndp = maxRepeat * hash( float3(i.time, i.nbUserStroke, i.time) ); int linedimension = floor(NbSpriteX);
p = (p + float2( mod(rndp,linedimension), rndp/linedimension))*sizeI;
float4 col = tex.isEmpty ? float4(p.x,p.y,0,1) : tex.sample( p ); return col ; }
There are thing that i can't understand why they wont work..
* Why the languange don't respect the uiMin and uiMax that i gave to the parameter for horizontal an vertical grid of the sprite. * Why if i use the mousewheel to change size of the horizontal or vertical grid it won't step by 1 unit * Every stroke start a new "line" with the same starting sprite unless i click on the UI of BlackInk and restart drawing
Is it possible to integrate a parameter logger features or function to see what value I'm receiving from certain operation ??