Search found 16 matches

by IsawU
Sun Jul 30, 2017 8:23 am
Forum: Support and Development
Topic: How do I make a button?
Replies: 1
Views: 6097

Re: How do I make a button?

You make button using the functionality that LÖVE provides. --You can use a library. You should be able to find some on the forum However the path of a wise man that learns something in the process goes like this: 1. You shall decide what shape the button will be. 2. Then you can draw that shape. 3....
by IsawU
Sun Jul 30, 2017 7:54 am
Forum: Support and Development
Topic: New here but probably a stupid question
Replies: 7
Views: 6103

Re: New here but probably a stupid question

Another question. What's the difference between the two if they do the same thing? The difference is almost none, sometimes you will find using .x = 0, .y = 0, .speed = 100 (easier to read), other times you will enjoy using {x = 0, y = 0, speed = 100} (initializing the table in one line of code). P...
by IsawU
Sat Jul 29, 2017 12:18 pm
Forum: Support and Development
Topic: [Solved] Can a shader variable have different value for each vertex?
Replies: 9
Views: 8822

Re: Can a shader variable have different value for each vertex?

zorg wrote: Sat Jul 29, 2017 11:43 am Image
2 sides is the lowest i believe.
Would work if your daily commute to work was about half a meter :)
by IsawU
Sat Jul 29, 2017 12:15 pm
Forum: Support and Development
Topic: [Solved] Can a shader variable have different value for each vertex?
Replies: 9
Views: 8822

Re: Can a shader variable have different value for each vertex?

raidho36 wrote: Sat Jul 29, 2017 5:37 am You create a mesh and attach additional attributes using standard functionality, then you draw that mesh.
Oh, right. I was wondering what those difficult ways to create a new Mesh meant. Thanks very much. Can this be done with lines and points too (and love.graphics.polygon as such)?
by IsawU
Sat Jul 29, 2017 2:07 am
Forum: Support and Development
Topic: [Solved] Can a shader variable have different value for each vertex?
Replies: 9
Views: 8822

Re: Can a shader variable have different value for each vertex?

You're spot on, yet wouldn't a transformation matrix be a mathematical description of how to move all the vertices, resulting in a triangle that has a shape of white polygon (such as red triangle)? Square wheelely talking, how can I implement vertex attributes in LÖVE, because from reading the GLSLa...
by IsawU
Fri Jul 28, 2017 5:00 pm
Forum: Support and Development
Topic: [Solved] Can a shader variable have different value for each vertex?
Replies: 9
Views: 8822

[Solved] Can a shader variable have different value for each vertex?

The way I understand it, if I have 3-vertex polygon and I draw it, the VERTEX shader runs 3 times (once for each vertex). We can send variable values to the shader just before we call love.graphics.polygon(...) . How do I ensure that for each vertex I get a different variable value. As an example I ...
by IsawU
Wed Jul 26, 2017 9:16 am
Forum: Support and Development
Topic: Access stencil data
Replies: 3
Views: 3034

Re: Access stencil data

You are probably right with the shaders, just need to learn how to do them now :)

I fact you are probably 100% right. The shaders should allow me to do calculations for each pixel of the shape using pixel effects.
by IsawU
Mon Jul 24, 2017 7:13 am
Forum: Support and Development
Topic: Access stencil data
Replies: 3
Views: 3034

Re: Access stencil data

You can use Shader s I guess; Not sure about shaders, I have never worked with them though. To describe it more thoroughly. Let's suppose I want to draw a shape. The shape takes up only specific pixels on the screen, while other stay untouched. I'd like to check all the pixels that WILL be affected...
by IsawU
Sun Jul 23, 2017 10:37 am
Forum: Support and Development
Topic: Does Love2D execute functions even before they are called?
Replies: 6
Views: 4500

Re: Does Love2D execute functions even before they are called?

This happened to you, because Lua compiler is single-pass, which would mean that all variables must exist before you try to access them (otherwise the compiler doesn't know where to point). Not true, that wouldn't work with the way lua deals with globals (or tables) at all. The "compiler"...
by IsawU
Sun Jul 23, 2017 9:46 am
Forum: Support and Development
Topic: [Solved] Screen and window dimensions
Replies: 2
Views: 2853

Re: Screen and window dimensions

I think what you're seeing is that in OpenGL the "pixels" of the screen are actually between coordinates. If you draw your point at (0.5, 0.5), it should look like a single pixel. Indeed. What you say is 100% correct and drawing pixels at ( 0.5; 0.5 ) and ( width - 0.5; height - 0.5 ) pro...