0
\$\begingroup\$

I'm working on a mod for a game and trying to add my own shader. I know practically nothing about shaders, but another similar shader exists and with their modding teams permission im using it as a baseline (the actual creator of the shader is now gone however, and so is anyone who's worked with shaders).

What I'm trying to do is reposition the texture on the UV. My actual texture is like a grid (1024 x 1024), which includes 4 smaller textures (512 x 512). To achieve this I'm attempting to set the x and y values on the following value that gets set at top my vert shader:

smooth out vec2 outUV1; 
outUV1.x = something; outUV1.y = something; 

A massive long shot, and I've probably been quite vague, but hoping if anyone can tell me if I'm on the right track or if their is any documentation on what changing x and y should have? Currently it seems to do nothing, I've tried 0, 1, the size of the texture (1024), half the size (512), and random numbers like 999999.

The game in question is Homeworld Remastered and the shader is in GLSL.

\$\endgroup\$
2
  • \$\begingroup\$ It's not at all clear to me what rule "something" is standing in for here, making it hard to suggest what formula to use to express that rule. Texture coordinates are in the 0-1 range, for what that's worth. Can you explain in more detail what you want, what you get when you try what you think it should be, and how that result differs from what you want? \$\endgroup\$ Commented Dec 12, 2023 at 0:00
  • \$\begingroup\$ Seeing more of the shader you are modifying would also be useful. \$\endgroup\$ Commented Dec 12, 2023 at 9:35

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.