Hello,
I’m currently in the process of rewriting my previous shader, but some of the details in how interpolators are handled seem (even if slightly) unclear to me.
I’m using this page for general reference; High-Level Shader Language - Wikipedia
When using a Texture2D, float, half, fixed, vertex, which registers does this actually affect withing the pixel/vertex shader comparisons?
I can’t seem to find any reference to use even as a general rule of thumb.
Judging from simply using #pragma target’s and messing around with texture2d tags i’m currently guessing the following:
texture2d mainly uses “Texture indirections”, but other then that i have no idea.
I assume that an executed instruction counts for every mathematical command (even an example tex.rgb=tex.rgb*0.8 )
I have no idea what a position register is
And i have no idea what the difference between the “Temp registers” and “Constant registers” is.
I want to ask this, because i’d love to know simply how these variables stack up,
i could in example in some cases pack 4 half’s into a single vector if it would give me the needed space elsewhere, but when i run into compilation issues i thus far generally know i only used too much of something, unless the error “Texture Interpolator” is returned, that one i’m already quite familiar with.
I had seen a topic a while ago which had talk about storing multiple fixed values in a fixed4, but even that topic i can’t seem to find at the moment for reference ![]()
Also, i was wondering if it’s possible to create a fixed4, but also destroy the same fixed4 to free up space and assign another later within a surf pass. I’d prefer that instead of making a single fixed4 named temp and having to use that name as reference over and over (just for readability of the code).
I hope someone knows some more details about these things, or maybe knows where to find some more documentation on the matter.