Does this TODO refer to the PR, or it more general?
Since both of these are already known in the setup function at shader evaluation time, we might want to implement the "default to transparent" logic there?
Do you think it could make sense to support colors here? It would increase the space usage, so we should only do it if there's a realistic use case I guess.
This is probably fine, but one consideration here is that all functions in the kernel share a namespace, so e.g. sin_theta
might easily conflict with something else in the future.
This appears 4 times I think, can we split it into a helper function?
I think this is only used if we actually sample TRRT? The compiler should probably optimize that by itself though I guess.
Is this conditional just due to compatibility?
Nitpicking, but we should probably try to not make this span five lines (maybe an if (is_circular)
?)
I think you also need to check whether the socket is connected here?
I think we can move this into the main if
below?
I'm not sure if the tooltips are the best place to put these values, might be better to keep it short and have them in the manual?
"preciser"->"more precise"
Changing the socket type and its value, is this the area of runtime declarations...?
Not sure about the details, but I don't think so, the type of the socket is fixed - it's just a one-time…