This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import GIFModule | |
| import HDL | |
| import MM4 | |
| import MolecularRenderer | |
| import QuaternionModule | |
| import xTB | |
| // MARK: - User-Facing Options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // FIRE.swift | |
| // MolecularRendererApp | |
| // | |
| // Created by Philip Turner on 5/31/24. | |
| // | |
| import HDL | |
| import Numerics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // FIRE.swift | |
| // MolecularRendererApp | |
| // | |
| // Created by Philip Turner on 5/31/24. | |
| // | |
| import HDL | |
| import Numerics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import HDL | |
| import MolecularRenderer | |
| import QuaternionModule | |
| // MARK: - Compile Structure | |
| func passivate(topology: inout Topology) { | |
| func createHydrogen( | |
| atomID: UInt32, | |
| orbital: SIMD3<Float> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // For profiling with D3D12 timestamp queries. | |
| #if os(Windows) | |
| import SwiftCOM | |
| import WinSDK | |
| #endif | |
| // Temporary import for profiling CPU-side bottleneck. | |
| import Foundation | |
| public struct PerformanceMeter { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // For profiling with D3D12 timestamp queries. | |
| #if os(Windows) | |
| import SwiftCOM | |
| import WinSDK | |
| #endif | |
| // TODO: Before finishing the acceleration structure PR, remove the public | |
| // modifier for the functions in this extension. | |
| extension Application { | |
| public func checkCrashBuffer(frameID: Int) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension Application { | |
| // TODO: Before finishing the acceleration structure PR, remove the public | |
| // modifier for this. | |
| public func updateBVH(inFlightFrameID: Int) { | |
| let transaction = atoms.registerChanges() | |
| device.commandQueue.withCommandList { commandList in | |
| // Bind the descriptor heap. | |
| #if os(Windows) | |
| commandList.setDescriptorHeap(descriptorHeap) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension Application { | |
| // Will eventually remove the public modifier and automatically invoke this | |
| // inside 'application.render()'. | |
| public func updateBVH(inFlightFrameID: Int) { | |
| updateBVH1(inFlightFrameID: inFlightFrameID) | |
| updateBVH2(inFlightFrameID: inFlightFrameID) | |
| } | |
| public func updateBVH1(inFlightFrameID: Int) { | |
| let transaction = atoms.registerChanges() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import HDL | |
| import MolecularRenderer | |
| @MainActor | |
| func createApplication() -> Application { | |
| // Set up the device. | |
| var deviceDesc = DeviceDescriptor() | |
| deviceDesc.deviceID = Device.fastestDeviceID | |
| let device = Device(descriptor: deviceDesc) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // FIRE.swift | |
| // MolecularRendererApp | |
| // | |
| // Created by Philip Turner on 5/31/24. | |
| // | |
| import HDL | |
| import Numerics |
NewerOlder