Search found 1557 matches

by pgimeno
Mon Apr 22, 2019 10:46 pm
Forum: Support and Development
Topic: Help with shaders
Replies: 2
Views: 75

Re: Help with shaders

The texture_coords of a circle or rectangle or line are always vec2(0,0), because the texture is just one white pixel (or at least it behaves as if it is). I can't look into your shader in enough detail now but maybe that info helps.
by pgimeno
Mon Apr 22, 2019 4:59 pm
Forum: Support and Development
Topic: Framework Recommendations
Replies: 4
Views: 113

Re: Framework Recommendations

There's no scene library in that list, so let me point to this one:

viewtopic.php?f=5&t=85947

Unless by scenes you mean states.
by pgimeno
Sun Apr 21, 2019 2:23 pm
Forum: General
Topic: Depth buffer and slanted sprites?
Replies: 10
Views: 899

Re: Depth buffer and slanted sprites?

Here's the PoC mentioned which handles (binary) alpha. It's almost the same program above; the only change is the addition of a pixel shader to main.lua. @zorg wouldn't that imply you have to draw everything twice? @raidho36 Nice recap. One issue I see with CPU sorting is that batches need to be reg...
by pgimeno
Sun Apr 21, 2019 12:21 pm
Forum: General
Topic: Depth buffer and slanted sprites?
Replies: 10
Views: 899

Re: Depth buffer and slanted sprites?

I don't have time now to write a PoC (maybe later today) but for full transparency handling (edit: by "full" I meant "binary", i.e. fully opaque or fully transparent), see https://learnopengl.com/Advanced-OpenGL/Blending - the section titled "Discarding fragments". It all boils down to use a pixel s...
by pgimeno
Sun Apr 21, 2019 1:31 am
Forum: General
Topic: Depth buffer and slanted sprites?
Replies: 10
Views: 899

Re: Depth buffer and slanted sprites?

Hi, welcome to the forums! It defines the number of bits per sample in the depth buffer. I believe 24 is the standard. 32 does not work in my system. This is necessary if you want to use the default depth buffer for the screen. I think you can use a canvas as a depth buffer, and in that case you don...
by pgimeno
Thu Apr 18, 2019 7:10 pm
Forum: Support and Development
Topic: Debug and production release
Replies: 5
Views: 2433

Re: Debug and production release

If you're concerned about performance, you can use ReFreezed's LuaPreprocess . Personally I don't disable assertions in production code. It's important to be able to get useful bug reports when problems arise. I don't use the system's assert; instead I use a version that allows me to specify the mes...
by pgimeno
Wed Apr 17, 2019 10:24 am
Forum: Support and Development
Topic: Image Layering
Replies: 5
Views: 2299

Re: Image Layering

If 'multiply' with a single colour is all you need, then yes, setColor should work (the problem is that it doesn't leave any whitish highlights like other blending modes do; such plain tinting is inadequate for some applications). LÖVE's blending modes are just a small subset of what GIMP or Photosh...
by pgimeno
Tue Apr 16, 2019 2:19 pm
Forum: General
Topic: What of Love's API uses DPI independent coords?
Replies: 1
Views: 2588

Re: What of Love's API uses DPI independent coords?

ImageData works with pixels. Right off the bat I don't remember any others.
by pgimeno
Tue Apr 16, 2019 1:54 pm
Forum: Support and Development
Topic: Image Layering
Replies: 5
Views: 2299

Re: Image Layering

You first need to come up with a procedure that fits your needs. Experiment with gimp until you know what process should be applied to every image. Once you have the procedure, you can mimic it with LÖVE in one of several ways. Processing ImageData with ImageData:mapPixel is one. Using canvases and ...
by pgimeno
Mon Apr 15, 2019 4:49 pm
Forum: Support and Development
Topic: Click to Move Question
Replies: 5
Views: 2183

Re: Click to Move Question

You don't need angles for this :) Every time you're calculating an angle just to take its sine or cosine, chances are you're wasting calculations. if distance > stepSize then -- if we're further away than stepSize, move towards the mouse's location in a straight line circle.x = circle.x + (mouse.x -...