MCPcopy Create free account
hub / github.com/RenderKit/embree / updateInstance

Function updateInstance

tutorials/user_geometry/user_geometry_device.cpp:241–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void updateInstance (RTCScene scene, Instance* instance)
242{
243#if ENABLE_NATIVE_INSTANCING
244 rtcSetGeometryTransform(instance->geometry,0,RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR,(float*)&instance->local2world);
245#endif
246
247 instance->world2local = rcp(instance->local2world);
248 instance->normal2world = transposed(rcp(instance->local2world.l));
249 rtcCommitGeometry(instance->geometry);
250}
251
252// ======================================================================== //
253// User defined sphere geometry //

Callers 1

device_renderFunction · 0.70

Calls 4

rtcSetGeometryTransformFunction · 0.85
transposedFunction · 0.85
rtcCommitGeometryFunction · 0.85
rcpFunction · 0.50

Tested by

no test coverage detected