Search found 612 matches

by ReFreezed
Wed Oct 19, 2022 1:34 pm
Forum: Libraries and Tools
Topic: Poisson Disc Sampling
Replies: 7
Views: 4257

Re: Poisson Disc Sampling

@darkfrei
Your implementation doesn't look quite as random and evenly distributed as the original. I see more patterns and lines among the samples.
by ReFreezed
Tue Oct 18, 2022 9:01 pm
Forum: Support and Development
Topic: sort order with shader
Replies: 10
Views: 5544

Re: sort order with shader

Draw the rectangles in the opposite order...
by ReFreezed
Tue Oct 18, 2022 7:45 pm
Forum: Support and Development
Topic: sort order with shader
Replies: 10
Views: 5544

Re: sort order with shader

When you draw half-transparent objects you must draw them from back to front for alpha blending to work properly, as the depth buffer only contains the distance to the closest object, no matter how "transparent" that object is (i.e. you cannot draw "behind" objects as the GPU has...
by ReFreezed
Tue Oct 18, 2022 11:46 am
Forum: General
Topic: Code Doodles!
Replies: 196
Views: 261889

Re: Code Doodles!

The issue is, the moon texture and the bats smear over the background. I can't tell if it's a shader issue, or a change to Love between versions. love.graphics.clear() is called before love.graphics.setCanvas(canv) instead of after. The old Canvas:clear() did not require the canvas to be active bef...
by ReFreezed
Sun Oct 16, 2022 2:40 pm
Forum: Support and Development
Topic: [SOLVED] Distortion Shader Doesn't Work on Android Version
Replies: 6
Views: 1939

Re: [SOLVED] Distortion Shader Doesn't Work on Android Version

I feel silly now. I'm using the same noise generator code from that very repo in my current project and I remember reading about the precision requirement. D'oh.
by ReFreezed
Sun Oct 16, 2022 2:20 pm
Forum: Support and Development
Topic: Physics broken before the first world:update
Replies: 7
Views: 2273

Re: Physics broken before the first world:update

tsugiru wrote: Sun Oct 16, 2022 10:43 am What platforms are you on? I'm on MacOS (arm chip). Maybe that's what causing the difference?
I'm on Windows with x86. I suppose that could be the issue. Try different LÖVE versions to see if the same thing happens. Maybe report the issue to the issue tracker.
by ReFreezed
Sun Oct 16, 2022 8:12 am
Forum: Libraries and Tools
Topic: Poisson Disc Sampling
Replies: 7
Views: 4257

Re: Poisson Disc Sampling

This is pretty useful stuff!
by ReFreezed
Sat Oct 15, 2022 12:37 pm
Forum: Support and Development
Topic: [SOLVED] Distortion Shader Doesn't Work on Android Version
Replies: 6
Views: 1939

Re: Distortion Shader Doesn't Work on Android Version

Looks like the u coordinate is always 0 in the shader for some reason. Try returning the uv coordinates.

Code: Select all

vec4 effect(vec4 color, Image TEXTURE, vec2 uv, vec2 pc) {
    return vec4(uv, 0.0, 1.0);
}
Maybe try with a different image, possibly with power-of-two dimensions.
by ReFreezed
Fri Oct 14, 2022 7:15 am
Forum: Support and Development
Topic: Physics broken before the first world:update
Replies: 7
Views: 2273

Re: Physics broken before the first world:update

Like BrotSagtMist, uncommenting any of the two places where setLinearVelocity is called produces the same value to be printed for me (499.99996948242). You better not rely on the physics stuff being predictable. But the physics are predictable as long as you provide the same input (like a fixed time...
by ReFreezed
Thu Oct 13, 2022 7:51 am
Forum: Support and Development
Topic: (Solved) HUMP Class - attempt to index local '***' (a nil value)
Replies: 5
Views: 1393

Re: HUMP Class - attempt to index local '***' (a nil value)

Did you maybe misspell the image variable? The fixed code should be something like this:

Code: Select all

local player
local player_tex = lg.newImage("assets/images/player.png")
function game:enter()
    player = Player(player_tex, Vec(display.size.w/2, display.size.h/2))
end