Without looking at this in depth -- scaling can either be a concrete 
value or it can be in relationship to the size of the image. Mostly, 
folks tend to scale things by relating them to the image size, as this 
makes the most sense in 3D environments. For the purposes of the 
tutorial, I decided to use the concrete value 256. I wrote a bit about 
this in the first tutorial section.

This is just one of the many forks in the road for creating a practical 
code-generator. We could make the choice optional (256 or somesuch might 
be good for 2D, while proportional to width or height would be best for 3D).

But as I said, I haven't looked at it closely, and have a lot of other 
*stuff* to do today and am not sure when I will get a chance.

:(

P



On 1/8/2013 5:51 AM, Sumio Kiyooka wrote:
>
> In src/main/resources/com/adonax/texturebuilder/export/TemplateJava.txt:
>
> > @@ -347,10 +354,10 @@ class TextureFunctions {
> >          float[][] noiseArray = new float[width][height];
> >
> >          for (int j = 0; j < height; j++) {
> > -            float y = (j * tp.yScale) / height + tp.yTranslate;
>
> scaling by width/height was completely incorrect (I think I introduced 
> this) and will create a stretched image. Should the constant be 256?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/philfrei/SiVi/pull/19/files#r2576940>.
>