Hi All,
Ive always wanted to know how the vop network for the shader runs its calculations. Lets assume I wrap up an Occlusion call inside a if block unless a condition is met for that if block will anything inside of that if block calculation wise be skipped or is information still obtained / run
Rob
Shader Vop calculations
2616 3 1- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
- tamte
- Member
- 8619 posts
- Joined: 7月 2007
- Offline
- Alanw
- Member
- 320 posts
- Joined: 8月 2007
- Offline
circusmonkey
Hi All,
Ive always wanted to know how the vop network for the shader runs its calculations. Lets assume I wrap up an Occlusion call inside a if block unless a condition is met for that if block will anything inside of that if block calculation wise be skipped or is information still obtained / run
Rob
I think it depends on whether or not your test condition is comparing against varying data, and you're executing a function that considers an area of points.
A conditional like this can split the object in two groups of points. If you test varying data like “s < 0.5” and call “texture()” there will be undefined values in the portion of the object that failed the test, while points in the portion that pass the test still reference these values. (leading to artifacts)
I know this is a limitation for prman, but I don't have time to test Mantra right now. I'd guess since it operates on batches of points in a SIMD fashion it holds true.
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
-
- Quick Links