Download

Shader's problem

Hi,

I’ve been learning shaders lately. I have a shader in unreal that I need to “convert” to unity. Due to a few problems I started checking basic nodes. And here new problems appeared :slight_smile:
Same operation, subtract, gives me different result for different engines.
If I subtract position in unity, I get different result on preview than without subtracting.



But when I’m doing it in unreal, preview is the same in both cases.


Am I doing something wrong or why are the results not the same? I do not mean the exact shade of the colors, but the arrangement of “quarters” of colors on the sphere.

It may look that way but it isn’t the same. You’ve subtracted two tenths of a centimeter from the X and Y coordinates.

Unity’s base unit is a meter. Unreal’s base unit is a centimeter. Meaning “0.2” in Unreal is 2 millimeters while in Unity it is 20 centimeters.

Ok, that explains a bit. I didn’t think about the different base unit size in engines. Thanks a lot!