Page MenuHome

Geometry Nodes: improve texture sampler code
Needs ReviewPublic

Authored by Ethan Hall (Ethan1080) on Mar 10 2022, 11:45 PM.

Details

Summary

The changes made in this patch are analogous to the changes made in
this Cycles patch: D14295 | rB4abb8a14a213.

This patch brings minor performance improvements, code consistency,
and also, helps cleanup to prepare for future features.


Future Features I Want to Implement:

  • Independent axis extensions for X/U and Y/V
  • Mirrored repeat texture extension mode

Here is a test file for verification purposes:

Diff Detail

Repository
rB Blender
Branch
geonode_tex_sampler_refactor (branched from master)
Build Status
Buildable 21043
Build 21043: arc lint + arc unit

Event Timeline

Ethan Hall (Ethan1080) requested review of this revision.Mar 10 2022, 11:45 PM
Ethan Hall (Ethan1080) created this revision.
Ethan Hall (Ethan1080) edited the summary of this revision. (Show Details)Mar 11 2022, 12:06 AM
Ethan Hall (Ethan1080) edited the summary of this revision. (Show Details)Mar 12 2022, 12:50 AM
  • Fixed some of the issues with the patch.
Ethan Hall (Ethan1080) edited the summary of this revision. (Show Details)Mar 14 2022, 5:51 AM

Is this ready for review, if yes, please add me as reviewer. Otherwise maybe add (WIP) to the title.

Ethan Hall (Ethan1080) edited the summary of this revision. (Show Details)Mar 14 2022, 8:12 PM
Ethan Hall (Ethan1080) retitled this revision from Geometry Nodes: Refactored parts of the texture sampler code to simplify and support further feature development to WIPGeometry Nodes: Refactored parts of the texture sampler code to simplify and support further feature development.
Ethan Hall (Ethan1080) retitled this revision from WIPGeometry Nodes: Refactored parts of the texture sampler code to simplify and support further feature development to (WIP) Geometry Nodes: Refactored parts of the texture sampler code to simplify and support further feature development.

@Jacques Lucke (JacquesLucke) I will wait until I do more testing and/or until my Cycles patch is accepted before adding you as reviewer.

  • Fix edge clip bounds for closest interpolation.
  • Changed order of image_pixel_lookup_clip conditional evaluation.
Ethan Hall (Ethan1080) updated this revision to Diff 49320.EditedMar 16 2022, 1:16 AM
  • Used integer comparison for closest clip bounds.
  • Increased the similarity with the new Cycles code
Ethan Hall (Ethan1080) retitled this revision from (WIP) Geometry Nodes: Refactored parts of the texture sampler code to simplify and support further feature development to Geometry Nodes: improve texture sampler code.Apr 26 2022, 4:55 PM
Ethan Hall (Ethan1080) edited the summary of this revision. (Show Details)