Search found 85 matches

by RedHot
Fri May 31, 2013 4:53 pm
Forum: Support and Development
Topic: Shaders and ints
Replies: 10
Views: 2197

Re: Shaders and ints

The last thing I am struggling with is an error when compiling a shader. The following code produces an error function love.load() effect = love.graphics.newPixelEffect [[ extern number maperx; //extern number blocksize; //extern vec2 mass[512]; vec4 effect(vec4 color, Image texture, vec2 texture_co...
by RedHot
Thu May 30, 2013 9:20 pm
Forum: Support and Development
Topic: Shaders and ints
Replies: 10
Views: 2197

Re: Shaders and ints

FML...

Thank you kind sir for explaining it to me :) I have decided to use ints as I wanted to acces an array element.

I am also trying to use an internal array of vec2d (500 elements). Is love going to give me problems?
by RedHot
Thu May 30, 2013 9:06 pm
Forum: Support and Development
Topic: Shaders and ints
Replies: 10
Views: 2197

Shaders and ints

I have been fiddling with ints and Love2d shaders (aka pixel effects) The following code seems alright to me, but produces an error function love.load() effect = love.graphics.newPixelEffect [[ extern int time; vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 pixel_coords) { return v...
by RedHot
Mon May 27, 2013 4:52 pm
Forum: Support and Development
Topic: Simulation problem [Love2D/Lua]
Replies: 2
Views: 563

Re: Simulation problem [Love2D/Lua]

You have the main.lua file in the attachment. Just run it as a Love2d code :)


Problem Solved

There was an error with. "if grid[j] == 1 then"
by RedHot
Mon May 27, 2013 3:01 pm
Forum: Support and Development
Topic: Simulation problem [Love2D/Lua]
Replies: 2
Views: 563

Simulation problem [Love2D/Lua]

As this is my first post I'd like to say hi everyone :) This is a "falling water" simulation based on a simple Cellular automata algorithm. Have a look at the attachment. The problem is I have designed the algorihm and according to my logic it's so simple it should work straight away. But some times...