Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Callback when parameter changes

1 ANTWORT 1
Antworten
Nachricht 1 von 2
Anonymous
232 Aufrufe, 1 Antwort

Callback when parameter changes

[Maya2019 ; Arnold6.0.1.0 ; MtoA4.0.1.0]

Hello

I'm writing a C++ shader that precomputes values into an array to speed up shader_evaluate calls. I need to update this array whenever a parameter is changed.

What I planned to do is : store former values of parameters, compare them with the current ones in shader_update and generate the array if they are different.

Is there a better way of doing this ? I feel like this is very heavy and and I don't want for this verifications to be done multiple times per rendering in case of IPR. I know it is possible to create callbacks in the Python template but I'm not sure this is usefull for my c++ program.

If there's not, is shader_update threaded ? i.e. should I lock a mutex or something before checking and updating my array in shader_update ?

Tags (1)
Beschriftungen (1)
1 ANTWORT 1
Nachricht 2 von 2
maxtarpini
als Antwort auf: Anonymous

If there's a better way of doing this ? Sure. Not doing it :leicht_lächelndes_Gesicht:

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report