Synthesize textures of different sizes within unity shader

Asked 1 years ago, Updated 1 years ago, 47 views

I have a question in unity5.6 shader.
I'd like to combine the two textures, but I don't know how to write shader that sticks out the original size.
It's displayed in the original size and the protruding part is not drawn, but is there any way to solve it well?

For example, 100x100px changes the center point and the final output is 120x100px.
Thank you for your cooperation.

unity3d

2022-09-30 17:29

1 Answers

Regardless of Unity, there is no concept of resolution in textures within the shader.
Only normalized coordinates (UV coordinates, ST coordinates) exist.

Therefore, if you want to synthesize two textures in the shader,
Each coordinate will be calculated in advance and then blended.

There is no code, so 80% of the respondents answered with their imagination.
I'm sorry if I misunderstood you.


2022-09-30 17:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.