### Re: Journeywar

Posted:

**05 Mar 2017, 14:44**You might remember the flamepainter shader i was working on and off the last two years. Well im stuck there.

Conceptdrawing:

Turns out mapping a Gradient to a rectangular with seemless stretching is tough..

I get a error:
So what do you do, if you are stuck and cant get on on your own? Sit luck mother duck on the code waiting for a miracle? No. Share it and hope that somebody else gets further.

So in the attachments you can find how far i got. If you remove the functions mapping the gradient to the vertex, you get a rotating spiral.

In this function, the distorted rectacngular is mapped to a default Square (0,0)(1,0)(1,1),(0,1) to determinate the colour of each pixel. The approach is derived from the case 2 of this paper, an is basically a gradual remapping per pixel:

http://graphics.cs.cmu.edu/courses/15-4 ... s/proj.pdf

The error is produced by the functions calculating the determinant of the mapping matrice, that has to be inverted. Any advice is welcome.

If somebody needs it , i can post the shaderMonkey Projectfile.

Conceptdrawing:

Turns out mapping a Gradient to a rectangular with seemless stretching is tough..

I get a error:

Code: Select all

```
0(831) : error C5025: lvalue in array access too complex
0(831) : error C1068: ... or possible array index out of bounds
0(831) : error C5025: lvalue in array access too complex
0(831) : error C1068: ... or possible array index out of bounds
0(831) : error C5025: lvalue in array access too complex
0(831) : error C1068: ... or possible array index out of bounds
```

So in the attachments you can find how far i got. If you remove the functions mapping the gradient to the vertex, you get a rotating spiral.

In this function, the distorted rectacngular is mapped to a default Square (0,0)(1,0)(1,1),(0,1) to determinate the colour of each pixel. The approach is derived from the case 2 of this paper, an is basically a gradual remapping per pixel:

http://graphics.cs.cmu.edu/courses/15-4 ... s/proj.pdf

The error is produced by the functions calculating the determinant of the mapping matrice, that has to be inverted. Any advice is welcome.

If somebody needs it , i can post the shaderMonkey Projectfile.