Add Texture Sampler node to Cycles and Eevee
The current Texture nodes are an amalgamation of a texture source and a texture sampler. This is simple and convenient for very basic materials, but breaks down when node groups and texture coordinate manipulation is involved.
Coordinate manipulation is an extremely useful technique that can be used to achieve many advanced effects such as POM: blenderartists.org/t/parallax-shader-with-silhouette-clipping-for-blender-2-8-eevee-and-cycles/1162334
It is also usually quite advanced and math-heavy for users, so it's a perfect candidate to just compartmentalize such effects inside a node groups. However, since the only way to manipulate the coordinates of a texture is via the Vector input of the Image nodes, there's no convenient way to leave your texture data out of the node group.
I propose that a special Texture Sampler node is added which takes as inputs a texture asset and a vector, so that it can perform coordinate manipulation on whatever texture is plugged in, in a compartmentalized manner.
A new output socket of a new type would need to be added to the existing texture nodes, one that merely returns a reference to the texture asset instead of a color.
I want to stress, that the POM shader featured here is only one example.
2 Comments
If I understand it correctly, this would also be a great feature for some special texture mappings used to hide repeating patterns or remove seams. The method I use is create several copies of the texture with different translation and rotation and then alpha blend them using procedural noise.
With a texture sampler node it could be hidden inside a single nodegroup, while right now it is possible to group the coordinate mapping nodes and the alpha blending nodes, but not the setup as a whole, so it still gets messy and impractical to work with: imgur.com/a/ZVlXeWd
It's been a long while and it's really surprising to me that this still is not something that exists. It looks like it actually does exist in Geometry Nodes (as the 'Image' node that outputs image data that can then be plugged into the 'Image Texture' node along with a Vector and Frame index which outputs Color and Alpha data), so hopefully it's being considered for implementation into shader nodes.