Add Chromium-only Blender WebEngine parity work
This commit is contained in:
16
blender-5.2.0/scripts/templates_osl/basic_camera.osl
Normal file
16
blender-5.2.0/scripts/templates_osl/basic_camera.osl
Normal file
@@ -0,0 +1,16 @@
|
||||
/* A basic perspective camera. */
|
||||
|
||||
shader camera(float focal_length = 90.0 [[ float min = 0.0,
|
||||
string unit = "mm",
|
||||
float sensitivity = 0.2 ]],
|
||||
output point position = 0.0,
|
||||
output vector direction = 0.0,
|
||||
output color throughput = 1.0)
|
||||
{
|
||||
vector sensor_size;
|
||||
getattribute("cam:sensor_size", sensor_size);
|
||||
|
||||
point Pcam = camera_shader_raster_position() - point(0.5);
|
||||
Pcam *= sensor_size / focal_length;
|
||||
direction = normalize(vector(Pcam.x, Pcam.y, 1.0));
|
||||
}
|
||||
Reference in New Issue
Block a user