Fix #135955: OSL Window texture coordinate wrong for panoramic cameras

There is code that properly handles panoramic cameras in
`camera_world_to_ndc`, the transform matrices (e.g.
`OSLRenderServices::get_inverse_matrix`) in the `transform("NDC", P)`
call dont do the "full work" here (maybe they should though?).

But we can get to `camera_world_to_ndc` by just getting the "NDC"
attribute, so use that for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/136097
This commit is contained in:
Philipp Oeser
2025-03-18 09:11:45 +01:00
committed by Philipp Oeser
parent 985f6f82b6
commit d6da557358

View File

@@ -67,7 +67,7 @@ shader node_texture_coordinate(
Object = transform("object", P);
}
Camera = transform("camera", P);
Window = transform("NDC", P);
getattribute("NDC", Window);
Normal = normalize(transform("world", "object", N));
Reflection = -reflect(I, N);
}