#How to handle big arrays

1 messages · Page 1 of 1 (latest)

nimble abyss
#

if you dont know if you make big array in Shader editor godot crashes
so how we devlopers going to Handle big arrays like 262144 elements

analog sparrow
# nimble abyss if you dont know if you make big array in Shader editor godot crashes so how we ...

I know you use Vector2 inside your Array, have you tried this: https://docs.godotengine.org/en/stable/classes/class_packedvector2array.html#class-packedvector2array

First line sounds very relevant: "An array specifically designed to hold Vector2. Packs data tightly, so it saves memory for large array sizes."

nimble abyss
#

Sorry for confusion I forgot to type I am trying to do that in shader editor.

#

Right now I am packing arrays to texture but it is feels like not right way do that

green swift
#

Iirc that's like, basically what a lookup table is, innit?

nimble abyss
#

if you have time can you give me minimal example lookup table in godots shader language or just send tutorial any refrence link

green swift
#

I don't have any experience/resources in doing so unfortunately, was just saying that what you're doing with packing things to a texture is a type of lookup table

#

since you mentioned it feels like it's not the right way to do so

oak whale
#

(which is 268,435,456 elements)

nimble abyss
#

yes but mobile wont support texture that big

#

and you need to calculate texture uv position for no reason

#

if you want to use array