Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Get rid of dependent texture reads #64

Closed
kkaefer opened this issue Feb 13, 2014 · 1 comment
Closed

Get rid of dependent texture reads #64

kkaefer opened this issue Feb 13, 2014 · 1 comment

Comments

@kkaefer
Copy link
Contributor

kkaefer commented Feb 13, 2014

Our line pattern shader performs dependent texture reads. The word "dependent" is slightly misleading, as it typically refers to using the result of one texture read as input to another texture read. However, in our case it refers to us performing lots of calculations before we use it as an input parameter to the texture read.

@ansis
Copy link
Contributor

ansis commented Mar 30, 2016

Three shaders have these kind of dependent texture reads: pattern, linepattern, linesdf. All three of these perform a modulus in order to wrap the patterns.

I can think of two ways to remove the dependent reads:

  • use individual textures for each pattern and use the built in texture wrapping. This would break future data-driven styling which will need to use atlases.
  • split up geometries so that coordinates never need to be wrapped. This seems really, really complicated.

I'm not seeing us implementing either approach. The complexity and downsides seem bigger than the benefits.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants