Simple Tile Mirror Plugin

Just let it all out, buddy. You're among friends here.
Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: Simple Tile Mirror Plugin

Post by Joris »

No, the new stuff is mostly internal.

But the one Kadete's talking about is just a slider than folds out to reveal two more. You can have the exact same functionality with three sliders, minus the folding part.

hive8
Is seriously in love with Resolume. Met the parents and everything
Posts: 331
Joined: Sat Jan 22, 2011 22:42
Location: Los Angeles

Re: Simple Tile Mirror Plugin

Post by hive8 »

Got it :) Thank you for the the update, will these new interface option be released so we can use them with the FFGL framework.
HIVE 8 | Quantum Laser | http://www.hive8.com

hive8
Is seriously in love with Resolume. Met the parents and everything
Posts: 331
Joined: Sat Jan 22, 2011 22:42
Location: Los Angeles

Re: Simple Tile Mirror Plugin

Post by hive8 »

Joris wrote:1088 is the size of the texture used by the GPU, because GPUs like working with multiples of 16.

1080 is the last row of pixels containing any actual data. The other 8 rows are just filled with black.

Which pixels contain data is retrievable via GetMaxGLTexCoords. In your case, you'll need to multiply any texture coordinates by the maximum texture coordinates of 0.9926470588 (1080/1088). To be safe, that needs to happen on both the x and y axes (of course using different values for x and y!)
Hi Joris could you give me quick example.

For maxCoords.t i would get 1088 (or what value)
how do i get the texture height the 1080 in my case?
HIVE 8 | Quantum Laser | http://www.hive8.com

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: Simple Tile Mirror Plugin

Post by Joris »

You can get the height of a texture via texture.Height

(how hard are you slapping your forehead right now? ;))

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: Simple Tile Mirror Plugin

Post by Joris »

Btw, maxCoords.t will be a fractional value (Height / HardwareHeight), not the actual value in pixels.

hive8
Is seriously in love with Resolume. Met the parents and everything
Posts: 331
Joined: Sat Jan 22, 2011 22:42
Location: Los Angeles

Re: Simple Tile Mirror Plugin

Post by hive8 »

Joris wrote:Btw, maxCoords.t will be a fractional value (Height / HardwareHeight), not the actual value in pixels.

So i have the following which does not work

I am getting the hardware height
(float)Texture.HardwareHeight with this

then the Texture.Height

the i calculate like this


float tHeight = Texture.HardwareHeight / Texture.Height;

Which has no effect at all

I even hardcoded the value of 0.99264705882 in the

Code: Select all

	glBegin(GL_QUADS);

	//lower left
	glMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f);
	glVertex2f(-1.0f, -1.0f);

	//upper left
	glMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.99264705882);
	glVertex2f(-1.0f, 1.0f);

	//upper right
	glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s, 0.99264705882);
	glVertex2f(1.0f, 1.0f);

	//lower right
	glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s, 0.0f);
	glVertex2f(1.0f, -1.0f);
	glEnd();
Nothing as well

Code: Select all

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
	float color[] = { 0.0F, 0.0F, 0.0F, 0.0F };
	glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, color);

	if (m_MIS9) {
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
	}
I also have this

My head is bagging really hard against the desk :)
HIVE 8 | Quantum Laser | http://www.hive8.com

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: Simple Tile Mirror Plugin

Post by Joris »

I formatted your text and removed the commented lines to make things easier to read.

So what are you expecting to see and what are you actually seeing? "Nothing" can mean so many things. Which is kind of ironic when you think about it.

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: Simple Tile Mirror Plugin

Post by Joris »

float tHeight = Texture.HardwareHeight / Texture.Height;
If you look in the function, this is exactly what GetMaxGLTexCoords does for you. Except it does it the right way round (height/hardwareheight).

hive8
Is seriously in love with Resolume. Met the parents and everything
Posts: 331
Joined: Sat Jan 22, 2011 22:42
Location: Los Angeles

Re: Simple Tile Mirror Plugin

Post by hive8 »

Joris wrote:I formatted your text and removed the commented lines to make things easier to read.

So what are you expecting to see and what are you actually seeing? "Nothing" can mean so many things. Which is kind of ironic when you think about it.
Didn't see the formatted text :(

here is what i have after looking at the function which does exactly what i tried to do LOL

Code: Select all

	//draw the quad that will be painted by the shader/textures
	//note that we are sending texture coordinates to texture unit 1..
	//the vertex shader and fragment shader refer to this when querying for
	//texture coordinates of the inputTexure
	glBegin(GL_QUADS);

	//lower left
	// glScalef(1.0F - (m_xScaleS1Tex * 2.0F) + 1.0F, 1.0F - (m_yScaleS1Tex * 2.0F) + 1.0F, 0.0F);
	// glMultiTexCoord2f(GL_TEXTURE0, m_STXS9 - 0.5f, 0.0f);
	glMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f);
	//glVertex2f(-1.0f, -aspect);
	glVertex2f(-1.0f, -1.0f);

	//upper left
	glMultiTexCoord2f(GL_TEXTURE0, 0.0f, maxCoords.t);
	//glVertex2f(-1.0f, aspect);
	glVertex2f(-1.0f, 1.0f);

	//upper right
	glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s, maxCoords.t);
	//glVertex2f(1.0f, aspect);
	glVertex2f(1.0f, 1.0f);

	//lower right
	//glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s * (m_STXS9 - 0.5f), 0);
	glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s, 0.0f);
	//glVertex2f(1.0f, -aspect);
	glVertex2f(1.0f, -1.0f);
	glEnd();
Please HELP LOL my head about to explode.
HIVE 8 | Quantum Laser | http://www.hive8.com

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: Simple Tile Mirror Plugin

Post by Joris »

You realise I don't know what you want to do, right? And that I haven't seen what you're seeing? Posting code is cool, but you're going to have to use words to explain your problem first.

Post Reply