Going back to initial approach for uint16/float16 Optical Flow but need to do conversion on C++/Client side
This commit is contained in:
parent
6b6f639e15
commit
a087f2fb74
|
@ -423,7 +423,10 @@ class KeyboardControl(object):
|
|||
world.constant_velocity_enabled = True
|
||||
world.hud.notification("Enabled Constant Velocity Mode at 60 km/h")
|
||||
elif event.key > K_0 and event.key <= K_9:
|
||||
world.camera_manager.set_sensor(event.key - 1 - K_0)
|
||||
index_ctrl = 0
|
||||
if pygame.key.get_mods() & KMOD_CTRL:
|
||||
index_ctrl = 9
|
||||
world.camera_manager.set_sensor(event.key - 1 - K_0 + index_ctrl)
|
||||
elif event.key == K_r and not (pygame.key.get_mods() & KMOD_CTRL):
|
||||
world.camera_manager.toggle_recording()
|
||||
elif event.key == K_r and (pygame.key.get_mods() & KMOD_CTRL):
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
.kdev4
|
||||
.vscode
|
||||
Content
|
||||
Intermediate
|
||||
Saved
|
||||
Plugins/Carla/CarlaDependencies
|
||||
Plugins/Carla/Content
|
||||
Plugins/Carla/Intermediate
|
||||
Plugins/CarlaExporter/Intermediate
|
|
@ -0,0 +1 @@
|
|||
Chrono OFF CarSim OFF
|
|
@ -100,7 +100,14 @@ static void WriteFloatPixelsToBuffer_Vulkan(
|
|||
FIntRect(0, 0, Rect.X, Rect.Y),
|
||||
gFloatPixels,
|
||||
FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX));
|
||||
Buffer.copy_from(Offset, gFloatPixels);
|
||||
|
||||
TArray<float> IntermediateBuffer;
|
||||
IntermediateBuffer.Reserve(gFloatPixels.Num() * 2);
|
||||
for (FFloat16Color& color : gFloatPixels) {
|
||||
IntermediateBuffer.Add((color.R.GetFloat() - 32767) * (2.0 / 65535));
|
||||
IntermediateBuffer.Add((32767 - color.G.GetFloat()) * (2.0 / 65535));
|
||||
}
|
||||
Buffer.copy_from(Offset, IntermediateBuffer);
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
|
Loading…
Reference in New Issue