Search found 7 matches

by AllanAxolotls
Sat Jan 28, 2023 8:54 am
Forum: Support and Development
Topic: [Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?
Replies: 19
Views: 4264

Re: How to make an interpolated Triangle w/ vertex & pixel shaders?

Good day! :3 Well... I took your shaders + your mesh format exactly how they were, symbol by symbol, plus made a simple example which draw only 2 triangles with them. And it works! (aside from VertexColor, but looks like it is just not used in your shaders) I animated light position, so it is movin...
by AllanAxolotls
Fri Jan 27, 2023 7:19 pm
Forum: Support and Development
Topic: [Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?
Replies: 19
Views: 4264

Re: How to make an interpolated Triangle w/ vertex & pixel shaders?

Not having all your code to try from what I understand you are unable to pass the `VertexNormal` attribute to the fragment shader, to do this you just need to do something like this: attribute vec3 VertexNormal; // Mesh attribute varying vec3 VaryingNormal; // "Varying value" that will be...
by AllanAxolotls
Thu Jan 26, 2023 6:43 am
Forum: Support and Development
Topic: [Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?
Replies: 19
Views: 4264

Re: How to make an interpolated Triangle w/ vertex & pixel shaders?

Note that I added the vertex shader as an example to show how to pass a variable from the vertex to the fragment, but the variable `VertexColor` to a correspondence directly offered by Löve accessible in the fragment shader which is `VaryingColor` so the last shader that I proposed can be simplifie...
by AllanAxolotls
Mon Jan 23, 2023 4:02 pm
Forum: Support and Development
Topic: [Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?
Replies: 19
Views: 4264

Re: [Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?

Exactly when you replied I also realized that I just had to change that value. Sorry but thanks for the solution!
by AllanAxolotls
Mon Jan 23, 2023 3:49 pm
Forum: Support and Development
Topic: [Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?
Replies: 19
Views: 4264

Re: How to make an interpolated Triangle w/ vertex & pixel shaders?

That's nice! Now I just need to find a way to also include the Z-axis in the vertices when I create the new triangle mesh. Somewhere on the docs of love2d it was stated that using .newMesh a lot per frame can cause performance issues. So I want to just make a main array that holds every triangle mes...
by AllanAxolotls
Mon Jan 23, 2023 2:21 pm
Forum: Support and Development
Topic: [Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?
Replies: 19
Views: 4264

Re: How to make an interpolated Triangle w/ vertex & pixel shaders?

Something that looks like this? (I slightly customized it to my taste). Say if it's good what you want to talk about when you say "interpolated triangles" and by the way why do you want to do it on Löve2d and not directly with OpenGL which seems more appropriate to me? (in the sense that ...
by AllanAxolotls
Sun Jan 22, 2023 7:40 pm
Forum: Support and Development
Topic: [Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?
Replies: 19
Views: 4264

[Solved] How to make an interpolated Triangle w/ vertex & pixel shaders?

I've been trying to make one of those interpolated triangles that has 3 main colors at the vertices of a triangle: Red, Green and Blue. However, I have absolutely no idea how to implement this in Love2D with GLSL. I'm trying to follow a tutorial that is focused on OpenGL and GLSL and all of those ot...