Page MenuHome

Cleanup: Geometry Node: Image Texture
ClosedPublic

Authored by Iliya Katueshenock (Moder) on Nov 18 2022, 6:51 PM.

Details

Summary

Cleanup: Geometry Node: Image Texture

While trying to implement T102289: Image Texture sampling by int X and Y pixel indices,
I noticed that this node has several solutions that are very different from other, newer nodes.
This patch will add:

  • Explicitly sets default values
  • Dereferencing references.
  • Reduces the size of the node settings structure.

Diff Detail

Event Timeline

Iliya Katueshenock (Moder) requested review of this revision.Nov 18 2022, 6:51 PM
Iliya Katueshenock (Moder) created this revision.

Generally looks like a slight improvement, just a couple notes

source/blender/nodes/geometry/nodes/node_geo_image_texture.cc
50–59

uint8_t -> int8_t

387–390

vector_field wasn't const because we use std::move on it. I think that will give an error on some compilers

Iliya Katueshenock (Moder) marked 2 inline comments as done.
Iliya Katueshenock (Moder) edited the summary of this revision. (Show Details)
Iliya Katueshenock (Moder) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_image_texture.cc
387–390

Ah, so here's the thing. Yes, I do not have an error, but it sounds logical, since the transfer of rights takes ownership and the fact of having. I didn't think about it.

This revision is now accepted and ready to land.Nov 21 2022, 6:01 PM