Fluids Berlin Project on a Mac?

Hey,

Im going through this wonderful tutorial Noah Norman posted and having some trouble getting the TouchFluids Berlin project working on my mac. This looks like the error. Im new to GLSL and don’t even know how to approach solving this.

"

Pixel Shader Compile Results:
ERROR: 0:165: Argument 3 to function ‘textureOffset’ must be a constant expression
ERROR: 0:166: Argument 3 to function ‘textureOffset’ must be a constant expression
ERROR: 0:167: Argument 3 to function ‘textureOffset’ must be a constant expression
ERROR: 0:168: Argument 3 to function ‘textureOffset’ must be a constant expression
ERROR: 0:171: Argument 3 to function ‘textureOffset’ must be a constant expression
ERROR: 0:173: Use of undeclared identifier ‘pL’
ERROR: 0:173: Use of undeclared identifier ‘pR’
ERROR: 0:173: Use of undeclared identifier ‘pB’
ERROR: 0:173: Use of undeclared identifier ‘pT’
ERROR: 0:173: Use of undeclared identifier ‘bC’
ERROR: 0:215: Argument 3 to function ‘textureOffset’ must be a constant expression"

These are the links.

youtube.com/watch?v=r-95jCflRSA

github.com/ancillarymagnet/touchfluids

Has anyone tried this?

Ah nuts. I think Malcolm told me about this and I didn’t find a fix for it even though I said I would.

The issue is, like the error says, that the compiler wants a constant, rather than a variable, in that texture lookup, and the way I’ve set that function up would get super ugly if it were all written out with constants.

I gotta think about that some more but TBH that one is in the top 3 chunks of code in that solver I’d have a hard time rephrasing.

I’ll follow up if I come up with a … solve. Sorry.

Hey,

Thanks for taking the time to respond! I’ve been digging into the Fluids patch (on my work computer) and cant thank you enough for posting it. I’ve been wanting to play around with fluid systems for a while but had no clue how they worked. Peeling apart how this works has been extremely enlightening.

:stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue:

Hey really glad to hear it - Landon just pointed out that I never merged my latest branch.

Pull again from master and you might find the organization easier to work with (uses includes and externalizes GLSL, also links to credit (!!) for places where I figured out how to implement this – should have been there from the start :blush: )

github.com/ancillarymagnet/touchfluids

N

Hi,

This is an old topic but I still have the same error on the latest version of TouchDesigner 2022.2250.

ERROR: /project1/fluid_algos:72: ‘texel offset’ : argument must be compile-time constant

I had already been able to open the project without this error in the past. I tried to correct the error by myself but without success.

Thank you for any help!

1 Like

Im also running into the same issue. I know this is very old at this point. I just tried downloading the most recent and still run into this “textel offset” problem.