diff options
Diffstat (limited to 'intern/cycles/kernel/svm/svm_camera.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_camera.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/svm/svm_camera.h b/intern/cycles/kernel/svm/svm_camera.h index bfe9289fa02..00678a49d70 100644 --- a/intern/cycles/kernel/svm/svm_camera.h +++ b/intern/cycles/kernel/svm/svm_camera.h @@ -11,7 +11,7 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License + * limitations under the License. */ CCL_NAMESPACE_BEGIN @@ -23,17 +23,17 @@ ccl_device void svm_node_camera(KernelGlobals *kg, ShaderData *sd, float *stack, float3 vector; Transform tfm = kernel_data.cam.worldtocamera; - vector = transform_point(&tfm, sd->P); + vector = transform_point(&tfm, ccl_fetch(sd, P)); zdepth = vector.z; distance = len(vector); - if (stack_valid(out_vector)) + if(stack_valid(out_vector)) stack_store_float3(stack, out_vector, normalize(vector)); - if (stack_valid(out_zdepth)) + if(stack_valid(out_zdepth)) stack_store_float(stack, out_zdepth, zdepth); - if (stack_valid(out_distance)) + if(stack_valid(out_distance)) stack_store_float(stack, out_distance, distance); } |