Re: How can I store global variables one by one in an array?


トマトフライ
 

I know this is a silly thing to talk to a developer about.
I would appreciate it if you could share your wisdom.
 
I am trying to recreate a Raytraced Hard Shadow in Cycles in Blender.
https://github.com/unity3d-jp/RaytracedHardShadow
In the original OSL, this can be easily implemented using trace().
However, Cycles does not accept "shade" parameter input.
Therefore, the result of trace() is very dirty.
 
 
So I was looking for a way to calculate shadows without relying on the "Shade" parameter.
By letting the trace rays penetrate self geometry, I was able to determine the shadows falling from other objects.
Used inner product to determine P not facing the light.
However, I was unable to achieve a way to determine the shadow cast by the self geometry on self, which is why I asked the question.
 
 
If we have an array containing P, we can determine if light is being blocked by the difference in the inner product of the vector toward the light source.
With this in mind, I asked you the question, but I regret that I could not realize it.
 
 
 
 
Would what I have in mind be realized by other means?
I hope that will be the case.
 
 
Thank you.

Join osl-dev@lists.aswf.io to automatically receive all group messages.