Despatra / Phoxel

A path traced shader for Optifine or Iris. With easy to use profiles. Or if you like, fully customizable experience.
https://modrinth.com/project/phoxel
6 stars 0 forks source link

Pointless Extra Steps Taken In Binary Search POM #2

Closed Despatra closed 3 months ago

Despatra commented 3 months ago

Where is the code that has the problem?: In Gbuffers_terrain.fsh, inside the main loop in PerformParallax()

What is inaccurate or problematic about this code?: Steps are not adaptive, you will not need a large amount of steps once you get close to the intersection point. The parallax steps should only really apply at the first few checks, like 2 or 3

How could it be fixed? (If you don't know please say that): Create a setting that allows the user to choose a maximum pixel accuracy, then rather set the step to be based on that, so it may move a constant maximum distance and the lowest setting is "Pixel Perfect" where the step is equal to how much is needed to move to the next pixel in the texture. (at least for the first test)