├── .clang-format ├── .github ├── FUNDING.yml ├── GUIDELINES.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md └── workflows │ ├── ci_build.yml │ ├── ci_doxygen.yml │ └── openal │ ├── OpenAL32.dll │ └── README.md ├── .gitignore ├── .gitmodules ├── CMake ├── AcidGroupSources.cmake ├── AcidIncludeDirs.cmake ├── FindGlslang.cmake ├── FindOpenALSoft.cmake ├── FindSSE.cmake ├── Info.plist.in └── modules │ └── CodeCoverage.cmake ├── CMakeLists.txt ├── CMakeSettings.json ├── Documents ├── Acid.ai ├── Acid_01.png ├── Acid_02.png ├── Acid_03.png ├── Acid_04.png ├── CLion-Settings.jar ├── Default.codestyle.json ├── Doxyfile ├── Doxyfile-mcss ├── Equilibrium.ai ├── Equilibrium_01.png ├── Equilibrium_02.png ├── Equilibrium_03.png ├── Equilibrium_04.png ├── Equilibrium_05.png ├── Equilibrium_06.png ├── Equilibrium_07.png ├── Resharper.DotSettings ├── Screenshot1.png ├── Screenshot2.png ├── Screenshot3.png ├── Screenshot4.png ├── Screenshot5.png ├── VisualStudio.vssettings ├── acid.css ├── acid.js ├── favicon.ico └── github-icon.png ├── External ├── FastNoiseLite │ └── FastNoiseLite.h ├── FidelityFX-FSR │ ├── ffx_a.h │ └── ffx_fsr1.h ├── README.md ├── Zippy │ ├── ZipArchive.hpp │ ├── ZipEntry.hpp │ ├── ZipException.hpp │ ├── ZipUtilities.hpp │ └── Zippy.hpp ├── bitmask │ └── bitmask.hpp ├── cr │ └── cr.h ├── dr_libs │ ├── dr_flac.c │ ├── dr_flac.h │ ├── dr_mp3.c │ ├── dr_mp3.h │ ├── dr_opus.c │ ├── dr_opus.h │ ├── dr_wav.c │ └── dr_wav.h ├── libjpgd │ ├── jpgd.cpp │ ├── jpgd.h │ └── jpgd_idct.h ├── libspng │ ├── spng.c │ └── spng.h ├── magic_enum │ └── magic_enum.hpp ├── miniz │ ├── miniz.c │ └── miniz.h ├── rocket │ └── rocket.hpp ├── stb │ ├── stb_image.c │ ├── stb_image.h │ ├── stb_image_write.c │ ├── stb_image_write.h │ ├── stb_vorbis.c │ └── stb_vorbis.h ├── tinydng │ ├── tiny_dng.cpp │ └── tiny_dng.h ├── tinyexr │ ├── tiny_exr.cpp │ └── tiny_exr.h ├── tinygltf │ ├── json.hpp │ ├── tiny_gltf.cpp │ └── tiny_gltf.h ├── tinymsdf │ ├── tiny_msdf.cpp │ └── tiny_msdf.hpp └── tinyobj │ ├── tiny_obj.cpp │ └── tiny_obj.h ├── LICENSE.md ├── README.md ├── Resources ├── Fonts │ ├── Lobster-Regular.ttf │ ├── LobsterTwo-Bold.ttf │ ├── LobsterTwo-BoldItalic.ttf │ ├── LobsterTwo-Italic.ttf │ ├── LobsterTwo-Regular.ttf │ ├── OpenSans-Bold.ttf │ ├── OpenSans-BoldItalic.ttf │ ├── OpenSans-ExtraBold.ttf │ ├── OpenSans-ExtraBoldItalic.ttf │ ├── OpenSans-Italic.ttf │ ├── OpenSans-Light.ttf │ ├── OpenSans-LightItalic.ttf │ ├── OpenSans-Regular.ttf │ ├── OpenSans-SemiBold.ttf │ ├── OpenSans-SemiBoldItalic.ttf │ ├── ProximaNova-Black.ttf │ ├── ProximaNova-Bold.ttf │ ├── ProximaNova-Extrabold.ttf │ ├── ProximaNova-Light.ttf │ ├── ProximaNova-Regular.ttf │ ├── ProximaNova-Semibold.ttf │ ├── ProximaNova-Thin.ttf │ ├── Roboto-Black.ttf │ ├── Roboto-BlackItalic.ttf │ ├── Roboto-Bold.ttf │ ├── Roboto-BoldItalic.ttf │ ├── Roboto-Italic.ttf │ ├── Roboto-Light.ttf │ ├── Roboto-LightItalic.ttf │ ├── Roboto-Medium.ttf │ ├── Roboto-MediumItalic.ttf │ ├── Roboto-Regular.ttf │ ├── Roboto-Thin.ttf │ └── Roboto-ThinItalic.ttf ├── Gizmos │ ├── Arrow.obj │ ├── Capsule.obj │ ├── Cone.obj │ ├── Cube.obj │ ├── Cylinder.obj │ ├── Ring.obj │ └── Sphere.obj ├── Guis │ ├── 9Patch.png │ ├── Banner.png │ ├── Black.png │ ├── Button.png │ ├── Button_Filled.png │ ├── ColourWheel.png │ ├── Cursor.png │ ├── Gradient.png │ ├── Gradient_A.png │ ├── Radio.png │ ├── Radio_Check.png │ ├── Radio_Dot.png │ ├── Radio_Filled.png │ ├── Radio_X.png │ ├── Triangle_Down.png │ ├── Triangle_Right.png │ └── White.png ├── Icons │ ├── Icon-128.png │ ├── Icon-16.png │ ├── Icon-192.png │ ├── Icon-24.png │ ├── Icon-256.png │ ├── Icon-32.png │ ├── Icon-48.png │ ├── Icon-64.png │ ├── Icon-96.png │ ├── Icon.icns │ ├── Icon.ico │ └── generate.bat ├── InputSchemes │ ├── DefaultFont.json │ ├── DefaultGUI.json │ ├── DefaultPBR.json │ └── DefaultPhysics.json ├── Logos │ ├── Acid_01.png │ ├── Equilibrium_02.png │ ├── Equilibrium_04.png │ └── Equilibrium_05.png ├── Objects │ ├── Animated │ │ ├── Animated.json │ │ ├── Diffuse.png │ │ ├── Model.blend │ │ ├── Model.dae │ │ └── Model.glb │ ├── Player │ │ └── Player.json │ ├── SkyboxChapel │ │ ├── Back.png │ │ ├── Bottom.png │ │ ├── Front.png │ │ ├── Left.png │ │ ├── Right.png │ │ ├── SkyboxChapel.json │ │ ├── Top.png │ │ └── license.txt │ ├── SkyboxClouds │ │ ├── Back.png │ │ ├── Bottom.png │ │ ├── Front.png │ │ ├── Left.png │ │ ├── Right.png │ │ ├── SkyboxClouds.json │ │ └── Top.png │ ├── SkyboxSnowy │ │ ├── Back.png │ │ ├── Bottom.png │ │ ├── Front.png │ │ ├── Left.png │ │ ├── Right.png │ │ ├── SkyboxSnowy.json │ │ ├── Top.png │ │ └── license.txt │ ├── Smoke │ │ ├── Circular.png │ │ └── Smoke.json │ ├── Suzanne │ │ ├── Material.001 Diffuse Color.png │ │ ├── Material.003 Diffuse Color.png │ │ ├── Suzanne.blend │ │ ├── Suzanne.glb │ │ ├── Suzanne.mtl │ │ └── Suzanne.obj │ ├── Terrain │ │ ├── Grass.png │ │ └── Rocks.png │ └── Testing │ │ ├── Diffuse.png │ │ ├── Material.png │ │ ├── Model.obj │ │ ├── Model_Tea.obj │ │ ├── Normal.png │ │ └── Testing.json ├── Shaders │ ├── Brdf.comp │ ├── Defaults │ │ ├── Default.frag │ │ └── Default.vert │ ├── Deferred │ │ ├── Deferred.frag │ │ ├── Deferred.vert │ │ └── Lighting.glsl │ ├── Fonts │ │ ├── Font.frag │ │ └── Font.vert │ ├── Gizmos │ │ ├── Gizmo.frag │ │ └── Gizmo.vert │ ├── Guis │ │ ├── Gui.frag │ │ └── Gui.vert │ ├── Irradiance.comp │ ├── Noise.glsl │ ├── Particles │ │ ├── Particle.frag │ │ └── Particle.vert │ ├── Post │ │ ├── Blit.frag │ │ ├── Blur.frag │ │ ├── Crt.frag │ │ ├── Darken.frag │ │ ├── Default.frag │ │ ├── Default.vert │ │ ├── Dof.frag │ │ ├── Emboss.frag │ │ ├── Fxaa.frag │ │ ├── Grain.frag │ │ ├── Grey.frag │ │ ├── Lensflare.frag │ │ ├── Negative.frag │ │ ├── Pixel.frag │ │ ├── Sepia.frag │ │ ├── Ssao.frag │ │ ├── Tiltshift.frag │ │ ├── Tone.frag │ │ ├── Vignette.frag │ │ └── Wobble.frag │ ├── Prefiltered.comp │ ├── Shadows │ │ ├── Shadow.frag │ │ └── Shadow.vert │ ├── Skyboxes │ │ ├── Skybox.frag │ │ └── Skybox.vert │ └── Terrains │ │ ├── Terrain.frag │ │ └── Terrain.vert ├── Sounds │ ├── Button1.ogg │ ├── Button1.wav │ ├── Jump.ogg │ ├── Music │ │ └── Hiitori-Bocchi.ogg │ └── Screenshot.ogg ├── Tutorial │ ├── Shaders │ │ ├── tri1.frag │ │ ├── tri1.vert │ │ ├── tri2.frag │ │ ├── tri2.vert │ │ ├── tri3.frag │ │ ├── tri3.vert │ │ ├── tri4.frag │ │ ├── tri4.vert │ │ ├── tri5.frag │ │ ├── tri5.vert │ │ ├── tri6.frag │ │ ├── tri6.vert │ │ ├── tri7.frag │ │ └── tri7.vert │ ├── chalet.zip │ └── texture.jpg ├── Undefined.obj ├── Undefined.png └── Undefined2.png ├── Sources ├── Acid.hpp ├── AcidConfig.cmake.in ├── Animations │ ├── AnimatedMesh.cpp │ ├── AnimatedMesh.hpp │ ├── Animation │ │ ├── Animation.cpp │ │ ├── Animation.hpp │ │ ├── AnimationLoader.cpp │ │ ├── AnimationLoader.hpp │ │ ├── JointTransform.cpp │ │ ├── JointTransform.hpp │ │ ├── Keyframe.cpp │ │ └── Keyframe.hpp │ ├── Animator.cpp │ ├── Animator.hpp │ ├── Geometry │ │ ├── GeometryLoader.cpp │ │ ├── GeometryLoader.hpp │ │ └── VertexAnimated.hpp │ ├── Skeleton │ │ ├── Joint.cpp │ │ ├── Joint.hpp │ │ ├── SkeletonLoader.cpp │ │ └── SkeletonLoader.hpp │ └── Skin │ │ ├── SkinLoader.cpp │ │ ├── SkinLoader.hpp │ │ ├── VertexWeights.cpp │ │ └── VertexWeights.hpp ├── Audio │ ├── Audio.cpp │ ├── Audio.hpp │ ├── Flac │ │ ├── FlacSoundBuffer.cpp │ │ └── FlacSoundBuffer.hpp │ ├── Mp3 │ │ ├── Mp3SoundBuffer.cpp │ │ └── Mp3SoundBuffer.hpp │ ├── Ogg │ │ ├── OggSoundBuffer.cpp │ │ └── OggSoundBuffer.hpp │ ├── Opus │ │ ├── OpusSoundBuffer.cpp │ │ └── OpusSoundBuffer.hpp │ ├── Sound.cpp │ ├── Sound.hpp │ ├── SoundBuffer.cpp │ ├── SoundBuffer.hpp │ └── Wave │ │ ├── WaveSoundBuffer.cpp │ │ └── WaveSoundBuffer.hpp ├── Bitmaps │ ├── Bitmap.cpp │ ├── Bitmap.hpp │ ├── Dng │ │ ├── DngBitmap.cpp │ │ └── DngBitmap.hpp │ ├── Exr │ │ ├── ExrBitmap.cpp │ │ └── ExrBitmap.hpp │ ├── Jpg │ │ ├── JpgBitmap.cpp │ │ └── JpgBitmap.hpp │ └── Png │ │ ├── PngBitmap.cpp │ │ └── PngBitmap.hpp ├── CMakeLists.txt ├── CMakeSources.cmake ├── Config.hpp.in ├── Contexts │ └── Context.hpp ├── Devices │ ├── Cursor.cpp │ ├── Cursor.hpp │ ├── Joysticks.cpp │ ├── Joysticks.hpp │ ├── Monitor.cpp │ ├── Monitor.hpp │ ├── Window.cpp │ ├── Window.hpp │ ├── Windows.cpp │ └── Windows.hpp ├── Engine │ ├── App.hpp │ ├── Engine.cpp │ ├── Engine.hpp │ ├── Log.cpp │ ├── Log.hpp │ └── Module.hpp ├── Files │ ├── File.cpp │ ├── File.hpp │ ├── FileObserver.cpp │ ├── FileObserver.hpp │ ├── Files.cpp │ ├── Files.hpp │ ├── Json │ │ ├── Json.cpp │ │ └── Json.hpp │ ├── Node.cpp │ ├── Node.hpp │ ├── Node.inl │ ├── NodeConstView.cpp │ ├── NodeConstView.hpp │ ├── NodeConstView.inl │ ├── NodeFormat.hpp │ ├── NodeView.cpp │ ├── NodeView.hpp │ ├── NodeView.inl │ └── Xml │ │ ├── Xml.cpp │ │ ├── Xml.hpp │ │ └── XmlContainer.hpp ├── Fonts │ ├── FontType.cpp │ ├── FontType.hpp │ ├── FontsSubrender.cpp │ ├── FontsSubrender.hpp │ ├── Text.cpp │ └── Text.hpp ├── Gizmos │ ├── Gizmo.cpp │ ├── Gizmo.hpp │ ├── GizmoType.cpp │ ├── GizmoType.hpp │ ├── Gizmos.cpp │ ├── Gizmos.hpp │ ├── GizmosSubrender.cpp │ └── GizmosSubrender.hpp ├── Graphics │ ├── Buffers │ │ ├── Buffer.cpp │ │ ├── Buffer.hpp │ │ ├── InstanceBuffer.cpp │ │ ├── InstanceBuffer.hpp │ │ ├── PushHandler.cpp │ │ ├── PushHandler.hpp │ │ ├── StorageBuffer.cpp │ │ ├── StorageBuffer.hpp │ │ ├── StorageHandler.cpp │ │ ├── StorageHandler.hpp │ │ ├── UniformBuffer.cpp │ │ ├── UniformBuffer.hpp │ │ ├── UniformHandler.cpp │ │ └── UniformHandler.hpp │ ├── Commands │ │ ├── CommandBuffer.cpp │ │ ├── CommandBuffer.hpp │ │ ├── CommandPool.cpp │ │ └── CommandPool.hpp │ ├── Descriptors │ │ ├── Descriptor.hpp │ │ ├── DescriptorSet.cpp │ │ ├── DescriptorSet.hpp │ │ ├── DescriptorsHandler.cpp │ │ └── DescriptorsHandler.hpp │ ├── Devices │ │ ├── Instance.cpp │ │ ├── Instance.hpp │ │ ├── LogicalDevice.cpp │ │ ├── LogicalDevice.hpp │ │ ├── PhysicalDevice.cpp │ │ ├── PhysicalDevice.hpp │ │ ├── Surface.cpp │ │ └── Surface.hpp │ ├── Graphics.cpp │ ├── Graphics.hpp │ ├── Images │ │ ├── Image.cpp │ │ ├── Image.hpp │ │ ├── Image2d.cpp │ │ ├── Image2d.hpp │ │ ├── Image2dArray.cpp │ │ ├── Image2dArray.hpp │ │ ├── ImageCube.cpp │ │ ├── ImageCube.hpp │ │ ├── ImageDepth.cpp │ │ └── ImageDepth.hpp │ ├── Pipelines │ │ ├── Pipeline.hpp │ │ ├── PipelineCompute.cpp │ │ ├── PipelineCompute.hpp │ │ ├── PipelineGraphics.cpp │ │ ├── PipelineGraphics.hpp │ │ ├── Shader.cpp │ │ └── Shader.hpp │ ├── RenderStage.cpp │ ├── RenderStage.hpp │ ├── Renderer.hpp │ ├── Renderpass │ │ ├── Framebuffers.cpp │ │ ├── Framebuffers.hpp │ │ ├── Renderpass.cpp │ │ ├── Renderpass.hpp │ │ ├── Swapchain.cpp │ │ └── Swapchain.hpp │ ├── Subrender.hpp │ ├── SubrenderHolder.cpp │ └── SubrenderHolder.hpp ├── Guis │ ├── Gui.cpp │ ├── Gui.hpp │ ├── GuisSubrender.cpp │ └── GuisSubrender.hpp ├── Inputs │ ├── Axes │ │ ├── ButtonInputAxis.cpp │ │ ├── ButtonInputAxis.hpp │ │ ├── CompoundInputAxis.cpp │ │ ├── CompoundInputAxis.hpp │ │ ├── JoystickHatInput.cpp │ │ ├── JoystickHatInput.hpp │ │ ├── JoystickInputAxis.cpp │ │ ├── JoystickInputAxis.hpp │ │ ├── MouseInputAxis.cpp │ │ └── MouseInputAxis.hpp │ ├── Buttons │ │ ├── AxisInputButton.cpp │ │ ├── AxisInputButton.hpp │ │ ├── CompoundInputButton.cpp │ │ ├── CompoundInputButton.hpp │ │ ├── JoystickInputButton.cpp │ │ ├── JoystickInputButton.hpp │ │ ├── KeyboardInputButton.cpp │ │ ├── KeyboardInputButton.hpp │ │ ├── MouseInputButton.cpp │ │ └── MouseInputButton.hpp │ ├── InputAxis.hpp │ ├── InputButton.hpp │ ├── InputDelay.cpp │ ├── InputDelay.hpp │ ├── InputScheme.cpp │ ├── InputScheme.hpp │ ├── Inputs.cpp │ └── Inputs.hpp ├── Lights │ ├── Fog.cpp │ ├── Fog.hpp │ ├── Light.cpp │ └── Light.hpp ├── Materials │ ├── DefaultMaterial.cpp │ ├── DefaultMaterial.hpp │ ├── Material.hpp │ ├── MaterialPipeline.cpp │ └── MaterialPipeline.hpp ├── Maths │ ├── Colour.cpp │ ├── Colour.hpp │ ├── Colour.inl │ ├── ElapsedTime.cpp │ ├── ElapsedTime.hpp │ ├── Maths.cpp │ ├── Maths.hpp │ ├── Matrix2.cpp │ ├── Matrix2.hpp │ ├── Matrix3.cpp │ ├── Matrix3.hpp │ ├── Matrix4.cpp │ ├── Matrix4.hpp │ ├── Quaternion.cpp │ ├── Quaternion.hpp │ ├── Time.hpp │ ├── Time.inl │ ├── Transform.cpp │ ├── Transform.hpp │ ├── Vector2.cpp │ ├── Vector2.hpp │ ├── Vector2.inl │ ├── Vector3.cpp │ ├── Vector3.hpp │ ├── Vector3.inl │ ├── Vector4.cpp │ ├── Vector4.hpp │ └── Vector4.inl ├── Meshes │ ├── Mesh.cpp │ ├── Mesh.hpp │ ├── MeshesSubrender.cpp │ └── MeshesSubrender.hpp ├── Models │ ├── Gltf │ │ ├── GltfModel.cpp │ │ └── GltfModel.hpp │ ├── Model.cpp │ ├── Model.hpp │ ├── Obj │ │ ├── ObjModel.cpp │ │ └── ObjModel.hpp │ ├── Shapes │ │ ├── CubeModel.cpp │ │ ├── CubeModel.hpp │ │ ├── CylinderModel.cpp │ │ ├── CylinderModel.hpp │ │ ├── DiskModel.cpp │ │ ├── DiskModel.hpp │ │ ├── PatternMesh.cpp │ │ ├── PatternMesh.hpp │ │ ├── RectangleModel.cpp │ │ ├── RectangleModel.hpp │ │ ├── SimpleMesh.cpp │ │ ├── SimpleMesh.hpp │ │ ├── SphereModel.cpp │ │ └── SphereModel.hpp │ ├── Vertex2d.hpp │ └── Vertex3d.hpp ├── Network │ ├── Ftp │ │ ├── Ftp.cpp │ │ ├── Ftp.hpp │ │ ├── FtpDataChannel.cpp │ │ ├── FtpDataChannel.hpp │ │ ├── FtpResponse.cpp │ │ ├── FtpResponse.hpp │ │ ├── FtpResponseDirectory.cpp │ │ ├── FtpResponseDirectory.hpp │ │ ├── FtpResponseListing.cpp │ │ └── FtpResponseListing.hpp │ ├── Http │ │ ├── Http.cpp │ │ ├── Http.hpp │ │ ├── HttpRequest.cpp │ │ ├── HttpRequest.hpp │ │ ├── HttpResponse.cpp │ │ └── HttpResponse.hpp │ ├── IpAddress.cpp │ ├── IpAddress.hpp │ ├── Packet.cpp │ ├── Packet.hpp │ ├── README.md │ ├── Socket.cpp │ ├── Socket.hpp │ ├── SocketSelector.cpp │ ├── SocketSelector.hpp │ ├── Tcp │ │ ├── TcpListener.cpp │ │ ├── TcpListener.hpp │ │ ├── TcpSocket.cpp │ │ └── TcpSocket.hpp │ └── Udp │ │ ├── UdpSocket.cpp │ │ └── UdpSocket.hpp ├── Particles │ ├── Emitters │ │ ├── CircleEmitter.cpp │ │ ├── CircleEmitter.hpp │ │ ├── Emitter.hpp │ │ ├── LineEmitter.cpp │ │ ├── LineEmitter.hpp │ │ ├── PointEmitter.cpp │ │ ├── PointEmitter.hpp │ │ ├── SphereEmitter.cpp │ │ └── SphereEmitter.hpp │ ├── Particle.cpp │ ├── Particle.hpp │ ├── ParticleSystem.cpp │ ├── ParticleSystem.hpp │ ├── ParticleType.cpp │ ├── ParticleType.hpp │ ├── Particles.cpp │ ├── Particles.hpp │ ├── ParticlesSubrender.cpp │ └── ParticlesSubrender.hpp ├── Physics │ ├── Colliders │ │ ├── CapsuleCollider.cpp │ │ ├── CapsuleCollider.hpp │ │ ├── Collider.cpp │ │ ├── Collider.hpp │ │ ├── ConeCollider.cpp │ │ ├── ConeCollider.hpp │ │ ├── ConvexHullCollider.cpp │ │ ├── ConvexHullCollider.hpp │ │ ├── CubeCollider.cpp │ │ ├── CubeCollider.hpp │ │ ├── CylinderCollider.cpp │ │ ├── CylinderCollider.hpp │ │ ├── HeightfieldCollider.cpp │ │ ├── HeightfieldCollider.hpp │ │ ├── SphereCollider.cpp │ │ └── SphereCollider.hpp │ ├── CollisionObject.cpp │ ├── CollisionObject.hpp │ ├── Force.cpp │ ├── Force.hpp │ ├── Frustum.cpp │ ├── Frustum.hpp │ ├── KinematicCharacter.cpp │ ├── KinematicCharacter.hpp │ ├── Physics.cpp │ ├── Physics.hpp │ ├── Ray.cpp │ ├── Ray.hpp │ ├── Rigidbody.cpp │ └── Rigidbody.hpp ├── Post │ ├── Deferred │ │ ├── DeferredSubrender.cpp │ │ └── DeferredSubrender.hpp │ ├── Filters │ │ ├── BlitFilter.cpp │ │ ├── BlitFilter.hpp │ │ ├── BlurFilter.cpp │ │ ├── BlurFilter.hpp │ │ ├── CrtFilter.cpp │ │ ├── CrtFilter.hpp │ │ ├── DarkenFilter.cpp │ │ ├── DarkenFilter.hpp │ │ ├── DefaultFilter.cpp │ │ ├── DefaultFilter.hpp │ │ ├── DofFilter.cpp │ │ ├── DofFilter.hpp │ │ ├── EmbossFilter.cpp │ │ ├── EmbossFilter.hpp │ │ ├── FxaaFilter.cpp │ │ ├── FxaaFilter.hpp │ │ ├── GrainFilter.cpp │ │ ├── GrainFilter.hpp │ │ ├── GreyFilter.cpp │ │ ├── GreyFilter.hpp │ │ ├── LensflareFilter.cpp │ │ ├── LensflareFilter.hpp │ │ ├── NegativeFilter.cpp │ │ ├── NegativeFilter.hpp │ │ ├── PixelFilter.cpp │ │ ├── PixelFilter.hpp │ │ ├── SepiaFilter.cpp │ │ ├── SepiaFilter.hpp │ │ ├── SsaoFilter.cpp │ │ ├── SsaoFilter.hpp │ │ ├── TiltshiftFilter.cpp │ │ ├── TiltshiftFilter.hpp │ │ ├── ToneFilter.cpp │ │ ├── ToneFilter.hpp │ │ ├── VignetteFilter.cpp │ │ ├── VignetteFilter.hpp │ │ ├── WobbleFilter.cpp │ │ └── WobbleFilter.hpp │ ├── Pipelines │ │ ├── BlurPipeline.cpp │ │ └── BlurPipeline.hpp │ ├── PostFilter.cpp │ ├── PostFilter.hpp │ └── PostPipeline.hpp ├── Resources │ ├── Resource.hpp │ ├── Resources.cpp │ └── Resources.hpp ├── Scenes │ ├── Camera.hpp │ ├── Component.hpp │ ├── Entity.cpp │ ├── Entity.hpp │ ├── EntityHolder.cpp │ ├── EntityHolder.hpp │ ├── EntityPrefab.cpp │ ├── EntityPrefab.hpp │ ├── Scene.cpp │ ├── Scene.hpp │ ├── Scenes.cpp │ ├── Scenes.hpp │ ├── System.hpp │ ├── SystemHolder.cpp │ └── SystemHolder.hpp ├── Shadows │ ├── ShadowBox.cpp │ ├── ShadowBox.hpp │ ├── ShadowRender.cpp │ ├── ShadowRender.hpp │ ├── Shadows.cpp │ ├── Shadows.hpp │ ├── ShadowsSubrender.cpp │ └── ShadowsSubrender.hpp ├── Skyboxes │ ├── SkyboxMaterial.cpp │ └── SkyboxMaterial.hpp ├── Timers │ ├── Timers.cpp │ └── Timers.hpp ├── Uis │ ├── Constraints │ │ ├── BestFitConstraint.hpp │ │ ├── PixelConstraint.hpp │ │ ├── RatioConstraint.hpp │ │ ├── RelativeConstraint.hpp │ │ ├── UiAnchor.cpp │ │ ├── UiAnchor.hpp │ │ ├── UiConstraint.hpp │ │ ├── UiConstraints.cpp │ │ └── UiConstraints.hpp │ ├── Drivers │ │ ├── BounceDriver.hpp │ │ ├── ConstantDriver.hpp │ │ ├── FadeDriver.hpp │ │ ├── LinearDriver.hpp │ │ ├── SinewaveDriver.hpp │ │ ├── SlideDriver.hpp │ │ └── UiDriver.hpp │ ├── Inputs │ │ ├── UiBooleanInput.cpp │ │ ├── UiBooleanInput.hpp │ │ ├── UiButtonInput.cpp │ │ ├── UiButtonInput.hpp │ │ ├── UiDropdownInput.cpp │ │ ├── UiDropdownInput.hpp │ │ ├── UiGrabberInput.cpp │ │ ├── UiGrabberInput.hpp │ │ ├── UiRadioInput.cpp │ │ ├── UiRadioInput.hpp │ │ ├── UiSliderInput.cpp │ │ ├── UiSliderInput.hpp │ │ ├── UiTextInput.cpp │ │ └── UiTextInput.hpp │ ├── UiObject.cpp │ ├── UiObject.hpp │ ├── UiPanel.cpp │ ├── UiPanel.hpp │ ├── UiScrollBar.cpp │ ├── UiScrollBar.hpp │ ├── UiSection.cpp │ ├── UiSection.hpp │ ├── UiStartLogo.cpp │ ├── UiStartLogo.hpp │ ├── Uis.cpp │ └── Uis.hpp └── Utils │ ├── ConstExpr.hpp │ ├── EnumValue.hpp │ ├── Enumerate.hpp │ ├── Factory.hpp │ ├── Future.hpp │ ├── NonCopyable.hpp │ ├── RingBuffer.hpp │ ├── StreamFactory.hpp │ ├── String.cpp │ ├── String.hpp │ ├── ThreadPool.cpp │ ├── ThreadPool.hpp │ └── TypeInfo.hpp └── Tests ├── CMakeLists.txt ├── Editor ├── CMakeLists.txt ├── Editor.rc ├── EditorRenderer.cpp ├── EditorRenderer.hpp ├── Main.cpp ├── Plugins.cpp ├── Plugins.hpp └── Uis │ ├── Hierarchy.cpp │ ├── Hierarchy.hpp │ ├── Inspector.cpp │ ├── Inspector.hpp │ ├── Panels.cpp │ └── Panels.hpp ├── EditorTest ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp ├── MainRenderer.hpp ├── Scenes │ ├── FpsCamera.cpp │ ├── FpsCamera.hpp │ ├── FpsPlayer.cpp │ ├── FpsPlayer.hpp │ ├── Scene1.cpp │ └── Scene1.hpp └── Uis │ ├── OverlayDebug.cpp │ └── OverlayDebug.hpp ├── README.md ├── TestFont ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp ├── MainRenderer.hpp ├── Scenes │ ├── Scene1.cpp │ └── Scene1.hpp ├── TestFont.rc └── Uis │ ├── Pannable.cpp │ └── Pannable.hpp ├── TestGUI ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp ├── MainRenderer.hpp ├── Scenes │ ├── Scene1.cpp │ └── Scene1.hpp ├── TestGuis.rc └── Uis │ ├── OverlayDebug.cpp │ ├── OverlayDebug.hpp │ ├── Panels.cpp │ └── Panels.hpp ├── TestMaths ├── CMakeLists.txt └── Main.cpp ├── TestNetwork ├── CMakeLists.txt └── Main.cpp ├── TestPBR ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp ├── MainRenderer.hpp ├── Scenes │ ├── FreeCamera.cpp │ ├── FreeCamera.hpp │ ├── Scene1.cpp │ └── Scene1.hpp ├── TestPBR.rc └── Uis │ ├── OverlayDebug.cpp │ └── OverlayDebug.hpp ├── TestPacker ├── CMakeLists.txt └── Main.cpp ├── TestPhysics ├── Behaviours │ ├── HeightDespawn.cpp │ ├── HeightDespawn.hpp │ ├── NameTag.cpp │ ├── NameTag.hpp │ ├── Rotate.cpp │ └── Rotate.hpp ├── CMakeLists.txt ├── Configs │ ├── ConfigManager.cpp │ └── ConfigManager.hpp ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp ├── MainRenderer.hpp ├── Scenes │ ├── FpsCamera.cpp │ ├── FpsCamera.hpp │ ├── FpsPlayer.cpp │ ├── FpsPlayer.hpp │ ├── Scene1.cpp │ └── Scene1.hpp ├── Skybox │ ├── CelestialBody.cpp │ ├── CelestialBody.hpp │ ├── SkyboxCycle.cpp │ └── SkyboxCycle.hpp ├── Terrain │ ├── MeshTerrain.cpp │ ├── MeshTerrain.hpp │ ├── Terrain.cpp │ ├── Terrain.hpp │ ├── TerrainMaterial.cpp │ └── TerrainMaterial.hpp ├── TestPhysics.rc ├── Uis │ ├── OverlayDebug.cpp │ └── OverlayDebug.hpp └── World │ ├── World.cpp │ └── World.hpp ├── TestSerial ├── CMakeLists.txt └── Main.cpp ├── Tutorial1 ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp └── MainRenderer.hpp ├── Tutorial2 ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp └── MainRenderer.hpp ├── Tutorial3 ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp └── MainRenderer.hpp ├── Tutorial4 ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp └── MainRenderer.hpp ├── Tutorial5 ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp └── MainRenderer.hpp ├── Tutorial6 ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp └── MainRenderer.hpp ├── Tutorial7 ├── CMakeLists.txt ├── MainApp.cpp ├── MainApp.hpp ├── MainRenderer.cpp ├── MainRenderer.hpp ├── SceneTutorial7.cpp ├── SceneTutorial7.hpp └── SimpleMaterial.hpp └── Units ├── CMakeLists.txt ├── Main.cpp ├── Test_RingBuffer.cpp └── Test_Vector2.cpp /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: mattparks 4 | patreon: 5 | open_collective: 6 | ko_fi: 7 | tidelift: 8 | community_bridge: 9 | liberapay: 10 | issuehunt: 11 | otechie: 12 | custom: https://www.paypal.me/mattparks5855 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior. 15 | 16 | **Expected behaviour** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Screenshots** 20 | If applicable, add screenshots to help explain your problem. 21 | 22 | **Hardware:** 23 | - Device: [e.g. i5 4440, AMD R9 390] 24 | - OS: [e.g. Windows] 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/ci_doxygen.yml: -------------------------------------------------------------------------------- 1 | name: doxygen 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | doxygen: 10 | runs-on: ubuntu-20.04 11 | steps: 12 | - name: Install Doxygen 13 | run: | 14 | sudo apt-get install doxygen flex bison python3-pip 15 | sudo pip3 install jinja2 Pygments 16 | - uses: actions/checkout@v1 17 | - run: | 18 | git clone https://github.com/mosra/m.css.git Build/m.css 19 | ./Build/m.css/documentation/doxygen.py Documents/Doxyfile-mcss 20 | mkdir -p Build/doc-mcss/html/Documents 21 | cp Documents/*.png Build/doc-mcss/html/Documents 22 | - name: Deploy Docs 23 | uses: peaceiris/actions-gh-pages@v3 24 | with: 25 | github_token: ${{ secrets.GITHUB_TOKEN }} 26 | publish_branch: gh-pages 27 | publish_dir: Build/doc-mcss/html -------------------------------------------------------------------------------- /.github/workflows/openal/OpenAL32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/.github/workflows/openal/OpenAL32.dll -------------------------------------------------------------------------------- /.github/workflows/openal/README.md: -------------------------------------------------------------------------------- 1 | The file OpenAL32.dll was obtained from https://www.openal.org/downloads/oalinst.zip 2 | 3 | It is required to execute any of the test applications. 4 | 5 | The original source is only available as interactive installer that can't be used in build automation. 6 | 7 | The license statement displayed when running the installer reads as follows: 8 | 9 | Creative Labs, Inc. is providing you with this OpenAL32.dll installer and other OpenAL 10 | files ("Software"). You may use and freely integrate with your software applications 11 | and distribute such throughout the world at no cost or further obligation to Creative. 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/* 2 | .vscode/* 3 | .idea/* 4 | cmake-build-debug/* 5 | cmake-build-release/* 6 | Build/* 7 | Resources/Sounds/Music/Hiitori-Bocchi.wav 8 | Resources/Sounds/Music/Hiitori-Bocchi.mp3 9 | Resources/Sounds/Music/Hiitori-Bocchi.flac 10 | Resources/Sounds/Music/Hiitori-Bocchi.aiff 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "External/volk"] 2 | path = External/volk 3 | url = https://github.com/zeux/volk 4 | [submodule "External/glfw"] 5 | path = External/glfw 6 | url = https://github.com/glfw/glfw 7 | [submodule "External/freetype"] 8 | path = External/freetype 9 | url = https://github.com/freetype/freetype 10 | [submodule "External/glslang"] 11 | path = External/glslang 12 | url = https://github.com/KhronosGroup/glslang 13 | [submodule "External/bullet3"] 14 | path = External/bullet3 15 | url = https://github.com/bulletphysics/bullet3 16 | [submodule "External/physfs"] 17 | path = External/physfs 18 | url = https://github.com/icculus/physfs 19 | [submodule "External/googletest"] 20 | path = External/googletest 21 | url = https://github.com/google/googletest 22 | -------------------------------------------------------------------------------- /CMake/AcidGroupSources.cmake: -------------------------------------------------------------------------------- 1 | function(acid_group_sources _current_source_dir _source_root_path _group_prefix _source_list) 2 | foreach(_source IN ITEMS ${_source_list}) 3 | get_filename_component(_source_path "${_source}" PATH) 4 | file(RELATIVE_PATH _source_path_rel "${_current_source_dir}${_source_root_path}" "${_current_source_dir}/${_source_path}") 5 | string(REPLACE "/" "\\" _group_path "${_group_prefix}${_source_path_rel}") 6 | source_group("${_group_path}" FILES "${_source}") 7 | endforeach() 8 | endfunction() 9 | -------------------------------------------------------------------------------- /CMake/AcidIncludeDirs.cmake: -------------------------------------------------------------------------------- 1 | # Sets the install directories defined by GNU 2 | include(GNUInstallDirs) 3 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) 4 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) 5 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) 6 | # Visual Studio will default to Build/x64-Debug/bin/Debug, this removed the Debug postfix folder. 7 | # https://stackoverflow.com/questions/7229571/cmake-visual-studio-debug-folder 8 | foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) 9 | string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) 10 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/lib) 11 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/lib) 12 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin) 13 | endforeach() 14 | -------------------------------------------------------------------------------- /Documents/Acid.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Acid.ai -------------------------------------------------------------------------------- /Documents/Acid_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Acid_01.png -------------------------------------------------------------------------------- /Documents/Acid_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Acid_02.png -------------------------------------------------------------------------------- /Documents/Acid_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Acid_03.png -------------------------------------------------------------------------------- /Documents/Acid_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Acid_04.png -------------------------------------------------------------------------------- /Documents/CLion-Settings.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/CLion-Settings.jar -------------------------------------------------------------------------------- /Documents/Equilibrium.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Equilibrium.ai -------------------------------------------------------------------------------- /Documents/Equilibrium_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Equilibrium_01.png -------------------------------------------------------------------------------- /Documents/Equilibrium_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Equilibrium_02.png -------------------------------------------------------------------------------- /Documents/Equilibrium_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Equilibrium_03.png -------------------------------------------------------------------------------- /Documents/Equilibrium_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Equilibrium_04.png -------------------------------------------------------------------------------- /Documents/Equilibrium_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Equilibrium_05.png -------------------------------------------------------------------------------- /Documents/Equilibrium_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Equilibrium_06.png -------------------------------------------------------------------------------- /Documents/Equilibrium_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Equilibrium_07.png -------------------------------------------------------------------------------- /Documents/Screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Screenshot1.png -------------------------------------------------------------------------------- /Documents/Screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Screenshot2.png -------------------------------------------------------------------------------- /Documents/Screenshot3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Screenshot3.png -------------------------------------------------------------------------------- /Documents/Screenshot4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Screenshot4.png -------------------------------------------------------------------------------- /Documents/Screenshot5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/Screenshot5.png -------------------------------------------------------------------------------- /Documents/acid.js: -------------------------------------------------------------------------------- 1 | function ToggleEnableIf(anchor) 2 | { 3 | if (!anchor.hasOwnProperty('enableIfHidden')) 4 | anchor['enableIfHidden'] = true; 5 | anchor.enableIfHidden = !anchor.enableIfHidden; 6 | 7 | content = anchor.parentNode.getElementsByTagName('span')[0] 8 | if (anchor.enableIfHidden) 9 | { 10 | anchor.style.display = ""; 11 | content.style.display = ""; 12 | } 13 | else 14 | { 15 | anchor.style.display = "none"; 16 | content.style.display = "block"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Documents/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/favicon.ico -------------------------------------------------------------------------------- /Documents/github-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Documents/github-icon.png -------------------------------------------------------------------------------- /External/Zippy/Zippy.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Troldal on 2019-03-13. 3 | // 4 | 5 | #ifndef ZIPPY_H 6 | #define ZIPPY_H 7 | 8 | #include "ZipArchive.hpp" 9 | #include "ZipEntry.hpp" 10 | #include "ZipException.hpp" 11 | 12 | #endif //ZIPPY_H 13 | -------------------------------------------------------------------------------- /External/tinymsdf/tiny_msdf.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/External/tinymsdf/tiny_msdf.hpp -------------------------------------------------------------------------------- /Resources/Fonts/Lobster-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Lobster-Regular.ttf -------------------------------------------------------------------------------- /Resources/Fonts/LobsterTwo-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/LobsterTwo-Bold.ttf -------------------------------------------------------------------------------- /Resources/Fonts/LobsterTwo-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/LobsterTwo-BoldItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/LobsterTwo-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/LobsterTwo-Italic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/LobsterTwo-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/LobsterTwo-Regular.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-Bold.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-BoldItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-ExtraBold.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-Italic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-Light.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-LightItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-SemiBold.ttf -------------------------------------------------------------------------------- /Resources/Fonts/OpenSans-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/OpenSans-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/ProximaNova-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/ProximaNova-Black.ttf -------------------------------------------------------------------------------- /Resources/Fonts/ProximaNova-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/ProximaNova-Bold.ttf -------------------------------------------------------------------------------- /Resources/Fonts/ProximaNova-Extrabold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/ProximaNova-Extrabold.ttf -------------------------------------------------------------------------------- /Resources/Fonts/ProximaNova-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/ProximaNova-Light.ttf -------------------------------------------------------------------------------- /Resources/Fonts/ProximaNova-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/ProximaNova-Regular.ttf -------------------------------------------------------------------------------- /Resources/Fonts/ProximaNova-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/ProximaNova-Semibold.ttf -------------------------------------------------------------------------------- /Resources/Fonts/ProximaNova-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/ProximaNova-Thin.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-Black.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-Italic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-Thin.ttf -------------------------------------------------------------------------------- /Resources/Fonts/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Fonts/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /Resources/Guis/9Patch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/9Patch.png -------------------------------------------------------------------------------- /Resources/Guis/Banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Banner.png -------------------------------------------------------------------------------- /Resources/Guis/Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Black.png -------------------------------------------------------------------------------- /Resources/Guis/Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Button.png -------------------------------------------------------------------------------- /Resources/Guis/Button_Filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Button_Filled.png -------------------------------------------------------------------------------- /Resources/Guis/ColourWheel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/ColourWheel.png -------------------------------------------------------------------------------- /Resources/Guis/Cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Cursor.png -------------------------------------------------------------------------------- /Resources/Guis/Gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Gradient.png -------------------------------------------------------------------------------- /Resources/Guis/Gradient_A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Gradient_A.png -------------------------------------------------------------------------------- /Resources/Guis/Radio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Radio.png -------------------------------------------------------------------------------- /Resources/Guis/Radio_Check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Radio_Check.png -------------------------------------------------------------------------------- /Resources/Guis/Radio_Dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Radio_Dot.png -------------------------------------------------------------------------------- /Resources/Guis/Radio_Filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Radio_Filled.png -------------------------------------------------------------------------------- /Resources/Guis/Radio_X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Radio_X.png -------------------------------------------------------------------------------- /Resources/Guis/Triangle_Down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Triangle_Down.png -------------------------------------------------------------------------------- /Resources/Guis/Triangle_Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/Triangle_Right.png -------------------------------------------------------------------------------- /Resources/Guis/White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Guis/White.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-128.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-16.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-192.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-24.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-256.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-32.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-48.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-64.png -------------------------------------------------------------------------------- /Resources/Icons/Icon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon-96.png -------------------------------------------------------------------------------- /Resources/Icons/Icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon.icns -------------------------------------------------------------------------------- /Resources/Icons/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Icons/Icon.ico -------------------------------------------------------------------------------- /Resources/Icons/generate.bat: -------------------------------------------------------------------------------- 1 | magick.exe convert Icon-16.png Icon-24.png Icon-32.png Icon-48.png Icon-64.png Icon-96.png Icon-128.png Icon-192.png Icon-256.png Icon.ico 2 | pause -------------------------------------------------------------------------------- /Resources/InputSchemes/DefaultFont.json: -------------------------------------------------------------------------------- 1 | { 2 | "joysticks": {}, 3 | "axes": [], 4 | "buttons": { 5 | "fullscreen": { 6 | "type": "keyboard", 7 | "key": 300, 8 | "inverted": false 9 | }, 10 | "screenshot": { 11 | "type": "keyboard", 12 | "key": 298, 13 | "inverted": false 14 | }, 15 | "exit": { 16 | "type": "keyboard", 17 | "key": 261, 18 | "inverted": false 19 | }, 20 | "reset": { 21 | "type": "keyboard", 22 | "key": 257, 23 | "inverted": false 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Resources/InputSchemes/DefaultGUI.json: -------------------------------------------------------------------------------- 1 | { 2 | "joysticks": {}, 3 | "axes": [], 4 | "buttons": { 5 | "fullscreen": { 6 | "type": "keyboard", 7 | "key": 300, 8 | "inverted": false 9 | }, 10 | "screenshot": { 11 | "type": "keyboard", 12 | "key": 298, 13 | "inverted": false 14 | }, 15 | "exit": { 16 | "type": "keyboard", 17 | "key": 261, 18 | "inverted": false 19 | }, 20 | "pause": { 21 | "type": "keyboard", 22 | "key": 256, 23 | "inverted": false 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Resources/Logos/Acid_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Logos/Acid_01.png -------------------------------------------------------------------------------- /Resources/Logos/Equilibrium_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Logos/Equilibrium_02.png -------------------------------------------------------------------------------- /Resources/Logos/Equilibrium_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Logos/Equilibrium_04.png -------------------------------------------------------------------------------- /Resources/Logos/Equilibrium_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Logos/Equilibrium_05.png -------------------------------------------------------------------------------- /Resources/Objects/Animated/Animated.json: -------------------------------------------------------------------------------- 1 | { 2 | "animatedMesh": { 3 | "filename": "Objects/Animated/Model.dae", 4 | "material": { 5 | "type": "default", 6 | "baseDiffuse": "#ffffff", 7 | "imageDiffuse": { 8 | "filename": "Objects/Animated/Diffuse.png", 9 | "filter": 1, 10 | "addressMode": 0, 11 | "anisotropic": true, 12 | "mipmap": true 13 | }, 14 | "metallic": 0.700000, 15 | "roughness": 0.600000, 16 | "imageMaterial": null, 17 | "imageNormal": null, 18 | "castsShadows": true, 19 | "ignoreLighting": false, 20 | "ignoreFog": false 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Resources/Objects/Animated/Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Animated/Diffuse.png -------------------------------------------------------------------------------- /Resources/Objects/Animated/Model.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Animated/Model.blend -------------------------------------------------------------------------------- /Resources/Objects/Animated/Model.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Animated/Model.glb -------------------------------------------------------------------------------- /Resources/Objects/Player/Player.json: -------------------------------------------------------------------------------- 1 | { 2 | "kinematicCharacter": { 3 | "colliders": [ 4 | { 5 | "type": "capsule", 6 | "radius": "0.2", 7 | "height": "1.8", 8 | "localTransform": { 9 | "position": { 10 | "x": 0.0, 11 | "y": 0.0, 12 | "z": 0.0 13 | }, 14 | "rotation": { 15 | "x": 0.0, 16 | "y": 0.0, 17 | "z": 0.0 18 | }, 19 | "scale": { 20 | "x": 1.0, 21 | "y": 1.0, 22 | "z": 1.0 23 | } 24 | } 25 | } 26 | ], 27 | "friction": 0.0, 28 | "frictionRolling": 0.0, 29 | "frictionSpinning": 0.0, 30 | "up": { 31 | "x": 0.0, 32 | "y": 1.0, 33 | "z": 0.0 34 | }, 35 | "stepHeight": 0.03, 36 | "fallSpeed": 55.0, 37 | "jumpSpeed": 10.0, 38 | "maxHeight": 1.5, 39 | "interpolate": true 40 | }, 41 | "fpsPlayer": { 42 | } 43 | } -------------------------------------------------------------------------------- /Resources/Objects/SkyboxChapel/Back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxChapel/Back.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxChapel/Bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxChapel/Bottom.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxChapel/Front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxChapel/Front.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxChapel/Left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxChapel/Left.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxChapel/Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxChapel/Right.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxChapel/SkyboxChapel.json: -------------------------------------------------------------------------------- 1 | { 2 | "mesh": { 3 | "model": { 4 | "type": "sphere", 5 | "latitudeBands": 10, 6 | "longitudeBands": 10, 7 | "radius": 1.0 8 | }, 9 | "material": { 10 | "type": "skybox", 11 | "image": { 12 | "filename": "Objects/SkyboxChapel", 13 | "fileSuffix": ".png", 14 | "fileSides": [ 15 | "Right", "Left", "Top", "Bottom", "Back", "Front" 16 | ], 17 | "filter": 1, 18 | "addressMode": 2, 19 | "anisotropic": true, 20 | "mipmap": true 21 | }, 22 | "baseColour": "#FFFFFF" 23 | } 24 | }, 25 | "skyboxCycle": { 26 | "enableFog": false, 27 | "enableRotation": false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Resources/Objects/SkyboxChapel/Top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxChapel/Top.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxChapel/license.txt: -------------------------------------------------------------------------------- 1 | Author 2 | ====== 3 | 4 | This is the work of Emil Persson, aka Humus. 5 | http://www.humus.name 6 | 7 | 8 | 9 | License 10 | ======= 11 | 12 | This work is licensed under a Creative Commons Attribution 3.0 Unported License. 13 | http://creativecommons.org/licenses/by/3.0/ -------------------------------------------------------------------------------- /Resources/Objects/SkyboxClouds/Back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxClouds/Back.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxClouds/Bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxClouds/Bottom.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxClouds/Front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxClouds/Front.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxClouds/Left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxClouds/Left.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxClouds/Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxClouds/Right.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxClouds/SkyboxClouds.json: -------------------------------------------------------------------------------- 1 | { 2 | "mesh": { 3 | "model": { 4 | "type": "sphere", 5 | "latitudeBands": 10, 6 | "longitudeBands": 10, 7 | "radius": 1.0 8 | }, 9 | "material": { 10 | "type": "skybox", 11 | "image": { 12 | "filename": "Objects/SkyboxClouds", 13 | "fileSuffix": ".png", 14 | "fileSides": [ 15 | "Right", "Left", "Top", "Bottom", "Back", "Front" 16 | ], 17 | "filter": 1, 18 | "addressMode": 2, 19 | "anisotropic": true, 20 | "mipmap": true 21 | }, 22 | "baseColour": "#FFFFFF" 23 | } 24 | }, 25 | "skyboxCycle": { 26 | "enableFog": false, 27 | "enableRotation": false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Resources/Objects/SkyboxClouds/Top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxClouds/Top.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxSnowy/Back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxSnowy/Back.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxSnowy/Bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxSnowy/Bottom.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxSnowy/Front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxSnowy/Front.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxSnowy/Left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxSnowy/Left.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxSnowy/Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxSnowy/Right.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxSnowy/SkyboxSnowy.json: -------------------------------------------------------------------------------- 1 | { 2 | "mesh": { 3 | "model": { 4 | "type": "sphere", 5 | "latitudeBands": 10, 6 | "longitudeBands": 10, 7 | "radius": 1.0 8 | }, 9 | "material": { 10 | "type": "skybox", 11 | "image": { 12 | "filename": "Objects/SkyboxSnowy", 13 | "fileSuffix": ".png", 14 | "fileSides": [ 15 | "Right", "Left", "Top", "Bottom", "Back", "Front" 16 | ], 17 | "filter": 1, 18 | "addressMode": 2, 19 | "anisotropic": true, 20 | "mipmap": true 21 | }, 22 | "baseColour": "#FFFFFF" 23 | } 24 | }, 25 | "skyboxCycle": { 26 | "enableFog": false, 27 | "enableRotation": false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Resources/Objects/SkyboxSnowy/Top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/SkyboxSnowy/Top.png -------------------------------------------------------------------------------- /Resources/Objects/SkyboxSnowy/license.txt: -------------------------------------------------------------------------------- 1 | Author 2 | ====== 3 | 4 | This is the work of Emil Persson, aka Humus. 5 | http://www.humus.name 6 | 7 | 8 | 9 | License 10 | ======= 11 | 12 | This work is licensed under a Creative Commons Attribution 3.0 Unported License. 13 | http://creativecommons.org/licenses/by/3.0/ -------------------------------------------------------------------------------- /Resources/Objects/Smoke/Circular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Smoke/Circular.png -------------------------------------------------------------------------------- /Resources/Objects/Suzanne/Material.001 Diffuse Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Suzanne/Material.001 Diffuse Color.png -------------------------------------------------------------------------------- /Resources/Objects/Suzanne/Material.003 Diffuse Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Suzanne/Material.003 Diffuse Color.png -------------------------------------------------------------------------------- /Resources/Objects/Suzanne/Suzanne.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Suzanne/Suzanne.blend -------------------------------------------------------------------------------- /Resources/Objects/Suzanne/Suzanne.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Suzanne/Suzanne.glb -------------------------------------------------------------------------------- /Resources/Objects/Terrain/Grass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Terrain/Grass.png -------------------------------------------------------------------------------- /Resources/Objects/Terrain/Rocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Terrain/Rocks.png -------------------------------------------------------------------------------- /Resources/Objects/Testing/Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Testing/Diffuse.png -------------------------------------------------------------------------------- /Resources/Objects/Testing/Material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Testing/Material.png -------------------------------------------------------------------------------- /Resources/Objects/Testing/Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Objects/Testing/Normal.png -------------------------------------------------------------------------------- /Resources/Shaders/Deferred/Deferred.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout(location = 0) out vec2 outUV; 4 | 5 | out gl_PerVertex { 6 | vec4 gl_Position; 7 | }; 8 | 9 | void main() { 10 | outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2); 11 | gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f); 12 | } 13 | -------------------------------------------------------------------------------- /Resources/Shaders/Fonts/Font.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0) uniform UniformObject { 6 | mat4 modelView; 7 | float alpha; 8 | 9 | vec4 colour; 10 | float scale; 11 | } object; 12 | 13 | layout(binding = 2) uniform sampler2DArray samplerMsdf; 14 | 15 | layout(location = 0) in vec3 inUV; 16 | 17 | layout(location = 0) out vec4 outColour; 18 | 19 | float median(float r, float g, float b) { 20 | return max(min(r, g), min(max(r, g), b)); 21 | } 22 | 23 | void main() { 24 | vec3 msdfSample = texture(samplerMsdf, inUV).rgb; 25 | float dist = object.scale * (median(msdfSample.r, msdfSample.g, msdfSample.b) - 0.5f); 26 | float o = clamp(dist + 0.5f, 0.0f, 1.0f); 27 | 28 | outColour = object.colour; 29 | outColour.a *= o * object.alpha; 30 | 31 | if (outColour.a < 0.05f) { 32 | outColour = vec4(0.0f); 33 | discard; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Resources/Shaders/Fonts/Font.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0) uniform UniformObject { 6 | mat4 modelView; 7 | float alpha; 8 | 9 | vec4 colour; 10 | } object; 11 | 12 | layout(location = 0) in vec2 inPosition; 13 | layout(location = 1) in vec3 inUV; 14 | 15 | layout(location = 0) out vec3 outUV; 16 | 17 | out gl_PerVertex { 18 | vec4 gl_Position; 19 | }; 20 | 21 | void main() { 22 | gl_Position = object.modelView * vec4(inPosition, 0.0f, 1.0f); 23 | 24 | outUV = inUV; 25 | } 26 | -------------------------------------------------------------------------------- /Resources/Shaders/Gizmos/Gizmo.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(location = 0) in vec4 inColour; 6 | 7 | layout(location = 0) out vec4 outColour; 8 | 9 | void main() { 10 | outColour = inColour; 11 | } 12 | -------------------------------------------------------------------------------- /Resources/Shaders/Gizmos/Gizmo.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0) uniform UniformScene { 6 | mat4 projection; 7 | mat4 view; 8 | } scene; 9 | 10 | layout(location = 0) in vec3 inPosition; 11 | 12 | layout(location = 3) in mat4 inModelMatrix; 13 | layout(location = 7) in vec4 inColour; 14 | 15 | layout(location = 0) out vec4 outColour; 16 | 17 | out gl_PerVertex { 18 | vec4 gl_Position; 19 | }; 20 | 21 | void main() { 22 | vec4 worldPosition = inModelMatrix * vec4(inPosition, 1.0f); 23 | 24 | gl_Position = scene.projection * scene.view * worldPosition; 25 | 26 | outColour = inColour; 27 | } 28 | -------------------------------------------------------------------------------- /Resources/Shaders/Guis/Gui.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0) uniform UniformObject { 6 | mat4 modelView; 7 | float alpha; 8 | 9 | float aspectRatio; 10 | 11 | vec4 colourOffset; 12 | vec2 atlasOffset; 13 | vec2 atlasScale; 14 | float atlasRows; 15 | vec4 ninePatches; 16 | } object; 17 | 18 | layout(location = 0) in vec2 inPosition; 19 | layout(location = 1) in vec2 inUV; 20 | 21 | layout(location = 0) out vec2 outUV; 22 | 23 | out gl_PerVertex { 24 | vec4 gl_Position; 25 | }; 26 | 27 | void main() { 28 | gl_Position = object.modelView * vec4(inPosition, 0.0f, 1.0f); 29 | 30 | outUV = object.atlasScale * ((inUV.xy / object.atlasRows) + object.atlasOffset); 31 | } 32 | -------------------------------------------------------------------------------- /Resources/Shaders/Particles/Particle.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 1) uniform sampler2D samplerColour; 6 | 7 | layout(location = 0) in vec2 inCoords1; 8 | layout(location = 1) in vec2 inCoords2; 9 | layout(location = 2) in vec4 inColourOffset; 10 | layout(location = 3) in float inBlendFactor; 11 | layout(location = 4) in float inTransparency; 12 | 13 | layout(location = 0) out vec4 outColour; 14 | 15 | void main() { 16 | vec4 colour1 = texture(samplerColour, inCoords1); 17 | vec4 colour2 = texture(samplerColour, inCoords2); 18 | 19 | outColour = mix(colour1, colour2, inBlendFactor); 20 | outColour *= inColourOffset; 21 | outColour.a *= inTransparency; 22 | } 23 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Blit.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0) uniform sampler2D samplerColour; 6 | 7 | layout(location = 0) in vec2 inUV; 8 | 9 | layout(location = 0) out vec4 outColour; 10 | 11 | void main() { 12 | outColour = texture(samplerColour, inUV); 13 | } 14 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Darken.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(push_constant) uniform PushScene { 6 | float factor; 7 | } scene; 8 | 9 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 10 | 11 | layout(binding = 1) uniform sampler2D samplerColour; 12 | 13 | layout(location = 0) in vec2 inUV; 14 | 15 | void main() { 16 | vec3 colour = texture(samplerColour, inUV).rgb; 17 | colour.rgb *= scene.factor; 18 | 19 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 20 | } 21 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Default.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 6 | 7 | layout(binding = 1) uniform sampler2D samplerColour; 8 | 9 | layout(location = 0) in vec2 inUV; 10 | 11 | layout(location = 0) out vec4 outColour; 12 | 13 | void main() { 14 | outColour = texture(samplerColour, inUV); 15 | 16 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), outColour); 17 | } 18 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Default.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout(location = 0) out vec2 outUV; 4 | 5 | out gl_PerVertex { 6 | vec4 gl_Position; 7 | }; 8 | 9 | void main() { 10 | outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2); 11 | gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f); 12 | } 13 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Grain.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(push_constant) uniform PushScene { 6 | float strength; 7 | } scene; 8 | 9 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 10 | 11 | layout(binding = 1) uniform sampler2D samplerColour; 12 | 13 | layout(location = 0) in vec2 inUV; 14 | 15 | void main() { 16 | float x = (inUV.x + 4.0f) * (inUV.y + 4.0f) * 10.0f; 17 | vec4 grain = vec4(mod((mod(x, 13.0f) + 1.0f) * (mod(x, 123.0f) + 1.0f), 0.01f) - 0.005f) * scene.strength; 18 | 19 | vec4 colour = texture(samplerColour, inUV) + grain; 20 | 21 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 22 | } 23 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Grey.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 6 | 7 | layout(binding = 1) uniform sampler2D samplerColour; 8 | 9 | layout(location = 0) in vec2 inUV; 10 | 11 | void main() { 12 | vec3 textureColour = texture(samplerColour, inUV).rgb; 13 | float grey = dot(textureColour, vec3(0.299f, 0.587f, 0.114f)); 14 | colour = vec4(grey, grey, grey, 1.0f); 15 | 16 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 17 | } 18 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Negative.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 6 | 7 | layout(binding = 1) uniform sampler2D samplerColour; 8 | 9 | layout(location = 0) in vec2 inUV; 10 | 11 | void main() { 12 | vec3 textureColour = texture(samplerColour, inUV).rgb; 13 | vec4 colour = vec4(1.0f - textureColour, 1.0f); 14 | 15 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 16 | } 17 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Pixel.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(push_constant) uniform PushScene { 6 | float pixelSize; 7 | } scene; 8 | 9 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 10 | 11 | layout(binding = 1) uniform sampler2D samplerColour; 12 | 13 | layout(location = 0) in vec2 inUV; 14 | 15 | void main() { 16 | vec2 sizeColour = textureSize(samplerColour, 0); 17 | 18 | float dx = scene.pixelSize * (1.0f / sizeColour.x); 19 | float dy = scene.pixelSize * (sizeColour.x / sizeColour.y) * (1.0f / sizeColour.y); 20 | vec2 coord = vec2(dx * floor(inUV.x / dx), dy * floor(inUV.y / dy)); 21 | 22 | vec4 colour = vec4(texture(samplerColour, coord).rgb, 1.0f); 23 | 24 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 25 | } 26 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Sepia.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 6 | 7 | layout(binding = 1) uniform sampler2D samplerColour; 8 | 9 | layout(location = 0) in vec2 inUV; 10 | 11 | void main() { 12 | vec3 textureColour = texture(samplerColour, inUV).rgb; 13 | float grey = dot(textureColour, vec3(0.299f, 0.587f, 0.114f)); 14 | vec4 colour = vec4(grey * vec3(1.2f, 1.0f, 0.8f), 1.0f); 15 | 16 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 17 | } 18 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Tone.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 6 | 7 | layout(binding = 1) uniform sampler2D samplerColour; 8 | 9 | layout(location = 0) in vec2 inUV; 10 | 11 | const float gamma = 2.0f; 12 | const float inverseGamma = 1.0f / gamma; 13 | 14 | vec3 uncharted2(vec3 hdr) { 15 | float A = 0.15f; 16 | float B = 0.50f; 17 | float C = 0.10f; 18 | float D = 0.20f; 19 | float E = 0.02f; 20 | float F = 0.30f; 21 | return ((hdr * (A * hdr + C * B) + D * E) / (hdr * (A * hdr + B) + D * F)) - E / F; 22 | } 23 | 24 | void main() { 25 | vec3 textureColour = texture(samplerColour, inUV).rgb; 26 | vec4 colour = vec4(pow(uncharted2(textureColour), vec3(inverseGamma)), 1.0f); 27 | 28 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 29 | } 30 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Vignette.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(push_constant) uniform PushScene { 6 | float innerRadius; 7 | float outerRadius; 8 | float opacity; 9 | } scene; 10 | 11 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 12 | 13 | layout(binding = 1) uniform sampler2D samplerColour; 14 | 15 | layout(location = 0) in vec2 inUV; 16 | 17 | void main() { 18 | vec4 textureColour = texture(samplerColour, inUV); 19 | vec4 colour = textureColour; 20 | colour.rgb *= 1.0f - smoothstep(scene.innerRadius, scene.outerRadius, length(inUV - 0.5f)); 21 | colour = mix(textureColour, colour, scene.opacity); 22 | 23 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 24 | } 25 | -------------------------------------------------------------------------------- /Resources/Shaders/Post/Wobble.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(push_constant) uniform PushScene { 6 | float moveIt; 7 | } scene; 8 | 9 | layout(binding = 0, rgba8) uniform writeonly image2D writeColour; 10 | 11 | layout(binding = 1) uniform sampler2D samplerColour; 12 | 13 | layout(location = 0) in vec2 inUV; 14 | 15 | const float pi = 3.141592653589793238462643f; 16 | const float di = 1.0f / 64.0f; 17 | 18 | void main() { 19 | vec2 t0 = inUV; 20 | t0.x += cos(2.0f * pi * inUV.y * 4.0f + scene.moveIt) * di; 21 | t0.y += sin(2.0f * pi * inUV.x * 4.0f + scene.moveIt) * di; 22 | vec4 colour = texture(samplerColour, t0); 23 | 24 | imageStore(writeColour, ivec2(inUV * imageSize(writeColour)), colour); 25 | } 26 | -------------------------------------------------------------------------------- /Resources/Shaders/Shadows/Shadow.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(location = 0) out vec4 outShadow; 6 | 7 | void main() { 8 | outShadow = vec4(1.0f); 9 | } 10 | -------------------------------------------------------------------------------- /Resources/Shaders/Shadows/Shadow.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(push_constant) uniform PushObject { 6 | mat4 mvp; 7 | } object; 8 | 9 | layout(location = 0) in vec3 inPosition; 10 | 11 | out gl_PerVertex { 12 | vec4 gl_Position; 13 | }; 14 | 15 | void main() { 16 | gl_Position = object.mvp * vec4(inPosition, 1.0f); 17 | } 18 | -------------------------------------------------------------------------------- /Resources/Shaders/Skyboxes/Skybox.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0) uniform UniformScene { 6 | mat4 projection; 7 | mat4 view; 8 | vec3 cameraPos; 9 | } scene; 10 | 11 | layout(binding = 1) uniform UniformObject { 12 | mat4 transform; 13 | vec4 baseColour; 14 | vec4 fogColour; 15 | vec2 fogLimits; 16 | float blendFactor; 17 | } object; 18 | 19 | layout(location = 0) in vec3 inPosition; 20 | 21 | layout(location = 0) out vec3 outPosition; 22 | layout(location = 1) out vec3 outUVW; 23 | 24 | out gl_PerVertex { 25 | vec4 gl_Position; 26 | }; 27 | 28 | void main() { 29 | vec4 worldPosition = object.transform * vec4(inPosition, 1.0f); 30 | 31 | mat4 viewStatic = mat4(scene.view); 32 | viewStatic[3][0] = 0.0f; 33 | viewStatic[3][1] = 0.0f; 34 | viewStatic[3][2] = 0.0f; 35 | 36 | gl_Position = scene.projection * viewStatic * worldPosition; 37 | 38 | outPosition = worldPosition.xyz; 39 | outUVW = inPosition; 40 | } 41 | -------------------------------------------------------------------------------- /Resources/Shaders/Terrains/Terrain.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout(binding = 0) uniform UniformScene { 6 | mat4 projection; 7 | mat4 view; 8 | vec3 cameraPos; 9 | } scene; 10 | 11 | layout(binding = 1) uniform UniformObject { 12 | mat4 transform; 13 | } object; 14 | 15 | layout(location = 0) in vec3 inPosition; 16 | layout(location = 1) in vec2 inUV; 17 | layout(location = 2) in vec3 inNormal; 18 | 19 | layout(location = 0) out vec3 outPosition; 20 | layout(location = 1) out vec2 outUV; 21 | layout(location = 2) out vec3 outNormal; 22 | 23 | out gl_PerVertex { 24 | vec4 gl_Position; 25 | }; 26 | 27 | void main() { 28 | vec4 worldPosition = object.transform * vec4(inPosition, 1.0f); 29 | mat3 normalMatrix = transpose(inverse(mat3(object.transform))); 30 | 31 | gl_Position = scene.projection * scene.view * worldPosition; 32 | 33 | outPosition = worldPosition.xyz; 34 | outUV = inUV; 35 | outNormal = normalMatrix * normalize(inNormal); 36 | } 37 | -------------------------------------------------------------------------------- /Resources/Sounds/Button1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Sounds/Button1.ogg -------------------------------------------------------------------------------- /Resources/Sounds/Button1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Sounds/Button1.wav -------------------------------------------------------------------------------- /Resources/Sounds/Jump.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Sounds/Jump.ogg -------------------------------------------------------------------------------- /Resources/Sounds/Music/Hiitori-Bocchi.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Sounds/Music/Hiitori-Bocchi.ogg -------------------------------------------------------------------------------- /Resources/Sounds/Screenshot.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Sounds/Screenshot.ogg -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri1.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(location = 0) out vec4 outColor; 5 | 6 | void main() { 7 | outColor = vec4(1.0, 0.0, 0.0, 1.0); 8 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri1.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | vec2 positions[3] = vec2[]( 4 | vec2(0.0, -0.5), 5 | vec2(0.5, 0.5), 6 | vec2(-0.5, 0.5) 7 | ); 8 | 9 | void main() { 10 | gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0); 11 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri2.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(location = 0) in vec3 fragColor; 5 | 6 | layout(location = 0) out vec4 outColor; 7 | 8 | void main() { 9 | outColor = vec4(fragColor, 1.0); 10 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri2.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(location = 0) in vec2 inPosition; 5 | layout(location = 1) in vec3 inColor; 6 | 7 | layout(location = 0) out vec3 fragColor; 8 | 9 | void main() { 10 | gl_Position = vec4(inPosition, 0.0, 1.0); 11 | fragColor = inColor; 12 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri3.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(location = 0) in vec3 fragColor; 5 | 6 | layout(location = 0) out vec4 outColor; 7 | 8 | void main() { 9 | outColor = vec4(fragColor, 1.0); 10 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri3.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(location = 0) in vec2 inPosition; 5 | layout(location = 1) in vec3 inColor; 6 | 7 | layout(location = 0) out vec3 fragColor; 8 | 9 | void main() { 10 | gl_Position = vec4(inPosition, 0.0, 1.0); 11 | fragColor = inColor; 12 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri4.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(location = 0) in vec3 fragColor; 5 | 6 | layout(location = 0) out vec4 outColor; 7 | 8 | void main() { 9 | outColor = vec4(fragColor, 1.0); 10 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri4.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(binding = 0) uniform UniformBufferObject { 5 | mat4 model; 6 | mat4 view; 7 | mat4 proj; 8 | } ubo; 9 | 10 | layout(location = 0) in vec2 inPosition; 11 | layout(location = 1) in vec3 inColor; 12 | 13 | layout(location = 0) out vec3 fragColor; 14 | 15 | void main() { 16 | gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 0.0, 1.0); 17 | fragColor = inColor; 18 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri5.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(binding = 1) uniform sampler2D texSampler; 5 | 6 | layout(location = 0) in vec3 fragColor; 7 | layout(location = 1) in vec2 fragTexCoord; 8 | 9 | layout(location = 0) out vec4 outColor; 10 | 11 | void main() { 12 | outColor = texture(texSampler, fragTexCoord); 13 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri5.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(binding = 0) uniform UniformBufferObject { 5 | mat4 model; 6 | mat4 view; 7 | mat4 proj; 8 | } ubo; 9 | 10 | layout(location = 0) in vec2 inPosition; 11 | layout(location = 1) in vec3 inColor; 12 | layout(location = 2) in vec2 inTexCoord; 13 | 14 | layout(location = 0) out vec3 fragColor; 15 | layout(location = 1) out vec2 fragTexCoord; 16 | 17 | void main() { 18 | gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 0.0, 1.0); 19 | fragColor = inColor; 20 | fragTexCoord = inTexCoord; 21 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri6.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(binding = 1) uniform sampler2D texSampler; 5 | 6 | layout(location = 0) in vec3 fragColor; 7 | layout(location = 1) in vec2 fragTexCoord; 8 | 9 | layout(location = 0) out vec4 outColor; 10 | 11 | void main() { 12 | outColor = texture(texSampler, fragTexCoord); 13 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri6.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(binding = 0) uniform UniformBufferObject { 5 | mat4 model; 6 | mat4 view; 7 | mat4 proj; 8 | } ubo; 9 | 10 | layout(location = 0) in vec3 inPosition; 11 | layout(location = 1) in vec3 inColor; 12 | layout(location = 2) in vec2 inTexCoord; 13 | 14 | layout(location = 0) out vec3 fragColor; 15 | layout(location = 1) out vec2 fragTexCoord; 16 | 17 | void main() { 18 | gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0); 19 | fragColor = inColor; 20 | fragTexCoord = inTexCoord; 21 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri7.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(binding = 2) uniform sampler2D texSampler; 5 | 6 | layout(location = 0) in vec2 fragTexCoord; 7 | //layout(location = 1) in vec3 fragColor; 8 | 9 | layout(location = 0) out vec4 outColor; 10 | 11 | void main() { 12 | outColor = texture(texSampler, fragTexCoord); 13 | } -------------------------------------------------------------------------------- /Resources/Tutorial/Shaders/tri7.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(binding = 0) uniform UniformScene { 5 | mat4 projection; 6 | mat4 view; 7 | vec3 cameraPos; 8 | } scene; 9 | 10 | layout(binding = 1) uniform UniformObject { 11 | mat4 transform; 12 | } object; 13 | 14 | layout(location = 0) in vec3 inPosition; 15 | layout(location = 1) in vec2 inTexCoord; 16 | layout(location = 2) in vec3 inNormal; 17 | 18 | layout(location = 0) out vec2 fragTexCoord; 19 | //layout(location = 1) out vec3 fragColor; 20 | 21 | void main() { 22 | gl_Position = scene.projection * scene.view * object.transform * vec4(inPosition, 1.0); 23 | // fragColor = inColor; 24 | fragTexCoord = inTexCoord; 25 | } -------------------------------------------------------------------------------- /Resources/Tutorial/chalet.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Tutorial/chalet.zip -------------------------------------------------------------------------------- /Resources/Tutorial/texture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Tutorial/texture.jpg -------------------------------------------------------------------------------- /Resources/Undefined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Undefined.png -------------------------------------------------------------------------------- /Resources/Undefined2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EQMG/Acid/2ff8adee30cfb571d27a1d937689608ccea12734/Resources/Undefined2.png -------------------------------------------------------------------------------- /Sources/Animations/Animation/Animation.cpp: -------------------------------------------------------------------------------- 1 | #include "Animation.hpp" 2 | 3 | namespace acid { 4 | Animation::Animation(const Time &length, std::vector keyframes) : 5 | length(length), 6 | keyframes(std::move(keyframes)) { 7 | } 8 | 9 | const Node &operator>>(const Node &node, Animation &animation) { 10 | node["length"].Get(animation.length); 11 | node["keyframes"].Get(animation.keyframes); 12 | return node; 13 | } 14 | 15 | Node &operator<<(Node &node, const Animation &animation) { 16 | node["length"].Set(animation.length); 17 | node["keyframes"].Set(animation.keyframes); 18 | return node; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sources/Animations/Animation/Keyframe.cpp: -------------------------------------------------------------------------------- 1 | #include "Keyframe.hpp" 2 | 3 | namespace acid { 4 | Keyframe::Keyframe(const Time &timeStamp, std::map pose) : 5 | timeStamp(timeStamp), 6 | pose(std::move(pose)) { 7 | } 8 | 9 | void Keyframe::AddJointTransform(const std::string &jointNameId, const Matrix4 &jointLocalTransform) { 10 | pose.emplace(jointNameId, jointLocalTransform); 11 | } 12 | 13 | const Node &operator>>(const Node &node, Keyframe &keyframe) { 14 | node["timeStamp"].Get(keyframe.timeStamp); 15 | node["pose"].Get(keyframe.pose); 16 | return node; 17 | } 18 | 19 | Node &operator<<(Node &node, const Keyframe &keyframe) { 20 | node["timeStamp"].Set(keyframe.timeStamp); 21 | node["pose"].Set(keyframe.pose); 22 | return node; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sources/Animations/Geometry/GeometryLoader.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Maths/Matrix4.hpp" 4 | #include "Maths/Vector3.hpp" 5 | #include "Utils/NonCopyable.hpp" 6 | #include "Animations/Skin/VertexWeights.hpp" 7 | #include "VertexAnimated.hpp" 8 | 9 | namespace acid { 10 | class ACID_EXPORT GeometryLoader : NonCopyable { 11 | public: 12 | GeometryLoader(NodeConstView &&libraryGeometries, std::vector vertexWeights, const Matrix4 &correction); 13 | 14 | const std::vector &GetVertices() const { return vertices; } 15 | const std::vector &GetIndices() const { return indices; } 16 | 17 | private: 18 | std::vector GetPositions() const; 19 | std::vector GetUvs() const; 20 | std::vector GetNormals() const; 21 | 22 | NodeConstView meshData; 23 | 24 | std::vector vertexWeights; 25 | Matrix4 correction; 26 | 27 | std::vector vertices; 28 | std::vector indices; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Animations/Skeleton/SkeletonLoader.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Files/Node.hpp" 4 | #include "Joint.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT SkeletonLoader { 8 | public: 9 | SkeletonLoader(NodeConstView &&libraryControllers, std::vector boneOrder, const Matrix4 &correction); 10 | 11 | uint32_t GetJointCount() const { return jointCount; } 12 | const Joint &GetHeadJoint() const { return headJoint; } 13 | 14 | private: 15 | Joint LoadJointData(const Node &jointNode, bool isRoot); 16 | Joint ExtractMainJointData(const Node &jointNode, bool isRoot); 17 | std::optional GetBoneIndex(const std::string &name) const; 18 | 19 | NodeConstView armatureData; 20 | std::vector boneOrder; 21 | Matrix4 correction; 22 | 23 | uint32_t jointCount = 0; 24 | Joint headJoint; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Animations/Skin/SkinLoader.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Files/Node.hpp" 4 | #include "VertexWeights.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT SkinLoader { 8 | public: 9 | SkinLoader(NodeConstView &&libraryControllers, uint32_t maxWeights); 10 | 11 | const std::vector &GetJointOrder() const { return jointOrder; } 12 | const std::vector &GetVertexWeights() const { return vertexWeights; } 13 | 14 | private: 15 | void LoadJointsList(); 16 | std::vector LoadWeights() const; 17 | std::vector GetEffectiveJointsCounts(const Node &weightsDataNode) const; 18 | void GetSkinWeights(const Node &weightsDataNode, const std::vector &counts, const std::vector &weights); 19 | 20 | NodeConstView skinData; 21 | uint32_t maxWeights; 22 | 23 | std::vector jointOrder; 24 | std::vector vertexWeights; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Animations/Skin/VertexWeights.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "Export.hpp" 7 | 8 | namespace acid { 9 | class ACID_EXPORT VertexWeights { 10 | public: 11 | void AddJointEffect(uint32_t jointId, float jointWeight); 12 | void LimitJointNumber(uint32_t max); 13 | void FillEmptyWeights(uint32_t max); 14 | float SaveTopWeights(std::vector &topWeightsArray); 15 | void RefillWeightList(const std::vector &topWeights, float total); 16 | void RemoveExcessJointIds(uint32_t max); 17 | 18 | const std::vector &GetJointIds() const { return jointIds; } 19 | const std::vector &GetWeights() const { return weights; } 20 | 21 | private: 22 | std::vector jointIds; 23 | std::vector weights; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /Sources/Audio/Flac/FlacSoundBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Audio/SoundBuffer.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT FlacSoundBuffer : public SoundBuffer::Registrar { 7 | inline static const bool Registered = Register(".flac"); 8 | public: 9 | static void Load(SoundBuffer &soundBuffer, const std::filesystem::path &filename); 10 | static void Write(const SoundBuffer &soundBuffer, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Audio/Mp3/Mp3SoundBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Audio/SoundBuffer.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT Mp3SoundBuffer : public SoundBuffer::Registrar { 7 | inline static const bool Registered = Register(".mp3"); 8 | public: 9 | static void Load(SoundBuffer &soundBuffer, const std::filesystem::path &filename); 10 | static void Write(const SoundBuffer &soundBuffer, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Audio/Ogg/OggSoundBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Audio/SoundBuffer.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT OggSoundBuffer : public SoundBuffer::Registrar { 7 | inline static const bool Registered = Register(".ogg"); 8 | public: 9 | static void Load(SoundBuffer &soundBuffer, const std::filesystem::path &filename); 10 | static void Write(const SoundBuffer &soundBuffer, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Audio/Opus/OpusSoundBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Audio/SoundBuffer.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT OpusSoundBuffer : public SoundBuffer::Registrar { 7 | inline static const bool Registered = Register(".opus"); 8 | public: 9 | static void Load(SoundBuffer &soundBuffer, const std::filesystem::path &filename); 10 | static void Write(const SoundBuffer &soundBuffer, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Audio/Wave/WaveSoundBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Audio/SoundBuffer.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT WaveSoundBuffer : public SoundBuffer::Registrar { 7 | inline static const bool Registered = Register(".wav", ".wave"); 8 | public: 9 | static void Load(SoundBuffer &soundBuffer, const std::filesystem::path &filename); 10 | static void Write(const SoundBuffer &soundBuffer, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Bitmaps/Dng/DngBitmap.cpp: -------------------------------------------------------------------------------- 1 | #include "DngBitmap.hpp" 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include "Files/Files.hpp" 8 | #include "Maths/Time.hpp" 9 | 10 | namespace acid { 11 | void DngBitmap::Load(Bitmap &bitmap, const std::filesystem::path &filename) { 12 | #ifdef ACID_DEBUG 13 | auto debugStart = Time::Now(); 14 | #endif 15 | 16 | auto fileLoaded = Files::Read(filename); 17 | 18 | if (!fileLoaded) { 19 | Log::Error("Bitmap could not be loaded: ", filename, '\n'); 20 | return; 21 | } 22 | 23 | // TODO 24 | 25 | #ifdef ACID_DEBUG 26 | Log::Out("Bitmap ", filename, " loaded in ", (Time::Now() - debugStart).AsMilliseconds(), "ms\n"); 27 | #endif 28 | } 29 | 30 | void DngBitmap::Write(const Bitmap &bitmap, const std::filesystem::path &filename) { 31 | #ifdef ACID_DEBUG 32 | auto debugStart = Time::Now(); 33 | #endif 34 | 35 | // TODO 36 | 37 | #ifdef ACID_DEBUG 38 | Log::Out("Bitmap ", filename, " written in ", (Time::Now() - debugStart).AsMilliseconds(), "ms\n"); 39 | #endif 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Sources/Bitmaps/Dng/DngBitmap.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Bitmaps/Bitmap.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT DngBitmap : public Bitmap::Registrar { 7 | inline static const bool Registered = Register(".dng", ".tiff"); 8 | public: 9 | static void Load(Bitmap &bitmap, const std::filesystem::path &filename); 10 | static void Write(const Bitmap &bitmap, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Bitmaps/Exr/ExrBitmap.cpp: -------------------------------------------------------------------------------- 1 | #include "ExrBitmap.hpp" 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include "Files/Files.hpp" 8 | #include "Maths/Time.hpp" 9 | 10 | namespace acid { 11 | void ExrBitmap::Load(Bitmap &bitmap, const std::filesystem::path &filename) { 12 | #ifdef ACID_DEBUG 13 | auto debugStart = Time::Now(); 14 | #endif 15 | 16 | auto fileLoaded = Files::Read(filename); 17 | 18 | if (!fileLoaded) { 19 | Log::Error("Bitmap could not be loaded: ", filename, '\n'); 20 | return; 21 | } 22 | 23 | // TODO 24 | 25 | #ifdef ACID_DEBUG 26 | Log::Out("Bitmap ", filename, " loaded in ", (Time::Now() - debugStart).AsMilliseconds(), "ms\n"); 27 | #endif 28 | } 29 | 30 | void ExrBitmap::Write(const Bitmap &bitmap, const std::filesystem::path &filename) { 31 | #ifdef ACID_DEBUG 32 | auto debugStart = Time::Now(); 33 | #endif 34 | 35 | // TODO 36 | 37 | #ifdef ACID_DEBUG 38 | Log::Out("Bitmap ", filename, " written in ", (Time::Now() - debugStart).AsMilliseconds(), "ms\n"); 39 | #endif 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Sources/Bitmaps/Exr/ExrBitmap.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Bitmaps/Bitmap.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT ExrBitmap : public Bitmap::Registrar { 7 | inline static const bool Registered = Register(".exr"); 8 | public: 9 | static void Load(Bitmap &bitmap, const std::filesystem::path &filename); 10 | static void Write(const Bitmap &bitmap, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Bitmaps/Jpg/JpgBitmap.cpp: -------------------------------------------------------------------------------- 1 | #include "JpgBitmap.hpp" 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include "Files/Files.hpp" 8 | #include "Maths/Time.hpp" 9 | 10 | namespace acid { 11 | void JpgBitmap::Load(Bitmap &bitmap, const std::filesystem::path &filename) { 12 | #ifdef ACID_DEBUG 13 | auto debugStart = Time::Now(); 14 | #endif 15 | 16 | auto fileLoaded = Files::Read(filename); 17 | 18 | if (!fileLoaded) { 19 | Log::Error("Bitmap could not be loaded: ", filename, '\n'); 20 | return; 21 | } 22 | 23 | // TODO 24 | 25 | #ifdef ACID_DEBUG 26 | Log::Out("Bitmap ", filename, " loaded in ", (Time::Now() - debugStart).AsMilliseconds(), "ms\n"); 27 | #endif 28 | } 29 | 30 | void JpgBitmap::Write(const Bitmap &bitmap, const std::filesystem::path &filename) { 31 | #ifdef ACID_DEBUG 32 | auto debugStart = Time::Now(); 33 | #endif 34 | 35 | // TODO 36 | 37 | #ifdef ACID_DEBUG 38 | Log::Out("Bitmap ", filename, " written in ", (Time::Now() - debugStart).AsMilliseconds(), "ms\n"); 39 | #endif 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Sources/Bitmaps/Jpg/JpgBitmap.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Bitmaps/Bitmap.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT JpgBitmap : public Bitmap::Registrar { 7 | inline static const bool Registered = Register(".jpg", ".jpeg"); 8 | public: 9 | static void Load(Bitmap &bitmap, const std::filesystem::path &filename); 10 | static void Write(const Bitmap &bitmap, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Bitmaps/Png/PngBitmap.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Bitmaps/Bitmap.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT PngBitmap : public Bitmap::Registrar { 7 | inline static const bool Registered = Register(".png"); 8 | public: 9 | static void Load(Bitmap &bitmap, const std::filesystem::path &filename); 10 | static void Write(const Bitmap &bitmap, const std::filesystem::path &filename); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Config.hpp.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace acid { 6 | constexpr std::string_view ACID_VERSION = "@Acid_VERSION@"; 7 | constexpr uint8_t ACID_VERSION_MAJOR = @Acid_VERSION_MAJOR@; 8 | constexpr uint8_t ACID_VERSION_MINOR = @Acid_VERSION_MINOR@; 9 | constexpr uint8_t ACID_VERSION_PATCH = @Acid_VERSION_PATCH@; 10 | 11 | constexpr std::string_view ACID_COMPILED_COMPILER = "@CMAKE_CXX_COMPILER@"; 12 | constexpr std::string_view ACID_COMPILED_SYSTEM = "@CMAKE_SYSTEM@"; 13 | constexpr std::string_view ACID_COMPILED_GENERATOR = "@CMAKE_GENERATOR@"; 14 | constexpr std::string_view ACID_COMPILED_COMMIT_HASH = "@ACID_GIT_COMMIT_HASH@"; 15 | constexpr std::string_view ACID_COMPILED_BRANCH = "@ACID_GIT_BRANCH@"; 16 | 17 | constexpr std::string_view ACID_RESOURCES_DEV = "@ACID_RESOURCES_DIR@"; 18 | } 19 | -------------------------------------------------------------------------------- /Sources/Contexts/Context.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Engine/Engine.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT Context { 7 | public: 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /Sources/Engine/Log.cpp: -------------------------------------------------------------------------------- 1 | #include "Log.hpp" 2 | 3 | namespace acid { 4 | std::mutex Log::WriteMutex; 5 | std::ofstream Log::FileStream; 6 | 7 | void Log::OpenLog(const std::filesystem::path &filepath) { 8 | //std::unique_lock lock(WriteMutex); 9 | if (auto parentPath = filepath.parent_path(); !parentPath.empty()) 10 | std::filesystem::create_directories(parentPath); 11 | FileStream.open(filepath); 12 | } 13 | 14 | void Log::CloseLog() { 15 | FileStream.close(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Sources/Files/Json/Json.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Files/Node.hpp" 6 | 7 | namespace acid { 8 | class ACID_EXPORT Json : public NodeFormatType { 9 | public: 10 | // Do not call Load and Write directly, use Node::ParseString and Node::WriteStream. 11 | static void Load(Node &node, std::string_view string); 12 | static void Write(const Node &node, std::ostream &stream, Format format = Minified); 13 | 14 | private: 15 | static void AddToken(std::string_view view, std::vector &tokens); 16 | static void Convert(Node ¤t, const std::vector &tokens, int32_t &k); 17 | 18 | static void AppendData(const Node &node, std::ostream &stream, Format format, int32_t indent); 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /Sources/Files/NodeView.inl: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Node.hpp" 4 | 5 | namespace acid { 6 | template 7 | void NodeView::Set(const T &value) { 8 | get()->Set(value); 9 | } 10 | 11 | template 12 | void NodeView::Set(T &&value) { 13 | get()->Set>(std::move(value)); 14 | } 15 | 16 | template 17 | Node &NodeView::operator=(const T &rhs) { 18 | return *get() = rhs; 19 | } 20 | 21 | template 22 | Node &NodeView::operator=(T &&rhs) { 23 | return *get() = std::move(rhs); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sources/Files/Xml/Xml.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Files/Node.hpp" 6 | 7 | namespace acid { 8 | class ACID_EXPORT Xml : public NodeFormatType { 9 | public: 10 | constexpr static char AttributePrefix = '@'; 11 | 12 | // Do not call Load and Write directly, use Node::ParseString and Node::WriteStream. 13 | static void Load(Node &node, std::string_view string); 14 | static void Write(const Node &node, std::ostream &stream, Format format = Minified); 15 | 16 | private: 17 | static void AddToken(std::string_view view, std::vector &tokens); 18 | static void Convert(Node ¤t, const std::vector &tokens, int32_t &k); 19 | static Node &CreateProperty(Node ¤t, const std::string &name); 20 | 21 | static void AppendData(const std::string &nodeName, const Node &node, std::ostream &stream, Format format, int32_t indent); 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /Sources/Fonts/FontsSubrender.cpp: -------------------------------------------------------------------------------- 1 | #include "FontsSubrender.hpp" 2 | 3 | #include "Uis/Uis.hpp" 4 | #include "Text.hpp" 5 | 6 | namespace acid { 7 | FontsSubrender::FontsSubrender(const Pipeline::Stage &pipelineStage) : 8 | Subrender(pipelineStage), 9 | pipeline(pipelineStage, {"Shaders/Fonts/Font.vert", "Shaders/Fonts/Font.frag"}, {VertexText::GetVertexInput()}) { 10 | } 11 | 12 | void FontsSubrender::Render(const CommandBuffer &commandBuffer) { 13 | pipeline.BindPipeline(commandBuffer); 14 | 15 | for (const auto &screenObject : Uis::Get()->GetObjects()) { 16 | if (!screenObject->IsEnabled()) continue; 17 | 18 | if (auto object = dynamic_cast(screenObject)) 19 | object->CmdRender(commandBuffer, pipeline); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sources/Fonts/FontsSubrender.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Subrender.hpp" 4 | #include "Graphics/Pipelines/PipelineGraphics.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT FontsSubrender : public Subrender { 8 | public: 9 | explicit FontsSubrender(const Pipeline::Stage &pipelineStage); 10 | 11 | void Render(const CommandBuffer &commandBuffer) override; 12 | 13 | private: 14 | PipelineGraphics pipeline; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /Sources/Gizmos/Gizmo.cpp: -------------------------------------------------------------------------------- 1 | #include "Gizmo.hpp" 2 | 3 | namespace acid { 4 | Gizmo::Gizmo(const std::shared_ptr &gizmoType, const Transform &transform, const std::optional &colour) : 5 | gizmoType(gizmoType), 6 | transform(transform), 7 | colour(colour ? *colour : gizmoType->GetColour()) { 8 | } 9 | 10 | bool Gizmo::operator==(const Gizmo &rhs) const { 11 | return gizmoType == rhs.gizmoType && transform == rhs.transform && colour == rhs.colour; 12 | } 13 | 14 | bool Gizmo::operator!=(const Gizmo &rhs) const { 15 | return !operator==(rhs); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Sources/Gizmos/Gizmos.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Scenes/System.hpp" 4 | #include "Gizmo.hpp" 5 | 6 | namespace acid { 7 | /** 8 | * @brief Module used for that manages debug gizmos. 9 | */ 10 | class ACID_EXPORT Gizmos : public System { 11 | public: 12 | using GizmosContainer = std::map, std::vector>>; 13 | 14 | Gizmos(); 15 | 16 | void Update() override; 17 | 18 | Gizmo *AddGizmo(std::unique_ptr &&gizmo); 19 | void RemoveGizmo(Gizmo *gizmo); 20 | 21 | /** 22 | * Clears all gizmos from the scene. 23 | */ 24 | void Clear(); 25 | 26 | /** 27 | * Gets a list of all gizmos. 28 | * @return All gizmos. 29 | */ 30 | const GizmosContainer &GetGizmos() const { return gizmos; } 31 | 32 | private: 33 | GizmosContainer gizmos; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /Sources/Gizmos/GizmosSubrender.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Subrender.hpp" 4 | #include "Graphics/Buffers/UniformHandler.hpp" 5 | #include "Graphics/Pipelines/PipelineGraphics.hpp" 6 | 7 | namespace acid { 8 | class ACID_EXPORT GizmosSubrender : public Subrender { 9 | public: 10 | explicit GizmosSubrender(const Pipeline::Stage &pipelineStage); 11 | 12 | void Render(const CommandBuffer &commandBuffer) override; 13 | 14 | private: 15 | PipelineGraphics pipeline; 16 | UniformHandler uniformScene; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /Sources/Graphics/Buffers/InstanceBuffer.cpp: -------------------------------------------------------------------------------- 1 | #include "InstanceBuffer.hpp" 2 | 3 | #include 4 | 5 | #include "Graphics/Graphics.hpp" 6 | 7 | namespace acid { 8 | InstanceBuffer::InstanceBuffer(VkDeviceSize size) : 9 | Buffer(size, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) { 10 | } 11 | 12 | void InstanceBuffer::Update(const CommandBuffer &commandBuffer, const void *newData) { 13 | void *data; 14 | MapMemory(&data); 15 | std::memcpy(data, newData, static_cast(size)); 16 | UnmapMemory(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sources/Graphics/Buffers/InstanceBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Buffer.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT InstanceBuffer : public Buffer { 7 | public: 8 | explicit InstanceBuffer(VkDeviceSize size); 9 | 10 | void Update(const CommandBuffer &commandBuffer, const void *newData); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Graphics/Buffers/StorageBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Descriptors/Descriptor.hpp" 4 | #include "Buffer.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT StorageBuffer : public Descriptor, public Buffer { 8 | public: 9 | explicit StorageBuffer(VkDeviceSize size, const void *data = nullptr); 10 | 11 | void Update(const void *newData); 12 | 13 | WriteDescriptorSet GetWriteDescriptor(uint32_t binding, VkDescriptorType descriptorType, const std::optional &offsetSize) const override; 14 | 15 | static VkDescriptorSetLayoutBinding GetDescriptorSetLayout(uint32_t binding, VkDescriptorType descriptorType, VkShaderStageFlags stage, uint32_t count); 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /Sources/Graphics/Buffers/UniformBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Descriptors/Descriptor.hpp" 4 | #include "Buffer.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT UniformBuffer : public Descriptor, public Buffer { 8 | public: 9 | explicit UniformBuffer(VkDeviceSize size, const void *data = nullptr); 10 | 11 | void Update(const void *newData); 12 | 13 | WriteDescriptorSet GetWriteDescriptor(uint32_t binding, VkDescriptorType descriptorType, const std::optional &offsetSize) const override; 14 | 15 | static VkDescriptorSetLayoutBinding GetDescriptorSetLayout(uint32_t binding, VkDescriptorType descriptorType, VkShaderStageFlags stage, uint32_t count); 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /Sources/Graphics/Commands/CommandPool.cpp: -------------------------------------------------------------------------------- 1 | #include "CommandPool.hpp" 2 | 3 | #include "Graphics/Graphics.hpp" 4 | 5 | namespace acid { 6 | CommandPool::CommandPool(const std::thread::id &threadId) : 7 | threadId(threadId) { 8 | auto logicalDevice = Graphics::Get()->GetLogicalDevice(); 9 | auto graphicsFamily = logicalDevice->GetGraphicsFamily(); 10 | 11 | VkCommandPoolCreateInfo commandPoolCreateInfo = {}; 12 | commandPoolCreateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; 13 | commandPoolCreateInfo.flags = VK_COMMAND_POOL_CREATE_TRANSIENT_BIT | VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; 14 | commandPoolCreateInfo.queueFamilyIndex = graphicsFamily; 15 | Graphics::CheckVk(vkCreateCommandPool(*logicalDevice, &commandPoolCreateInfo, nullptr, &commandPool)); 16 | } 17 | 18 | CommandPool::~CommandPool() { 19 | auto logicalDevice = Graphics::Get()->GetLogicalDevice(); 20 | 21 | vkDestroyCommandPool(*logicalDevice, commandPool, nullptr); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sources/Graphics/Commands/CommandPool.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "Export.hpp" 7 | 8 | namespace acid { 9 | /** 10 | * @brief Class that represents a command pool. 11 | */ 12 | class ACID_EXPORT CommandPool { 13 | public: 14 | explicit CommandPool(const std::thread::id &threadId = std::this_thread::get_id()); 15 | 16 | ~CommandPool(); 17 | 18 | operator const VkCommandPool &() const { return commandPool; } 19 | 20 | const VkCommandPool &GetCommandPool() const { return commandPool; } 21 | const std::thread::id &GetThreadId() const { return threadId; } 22 | 23 | private: 24 | VkCommandPool commandPool = VK_NULL_HANDLE; 25 | std::thread::id threadId; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Graphics/Descriptors/DescriptorSet.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Commands/CommandBuffer.hpp" 4 | #include "Graphics/Pipelines/Pipeline.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT DescriptorSet { 8 | public: 9 | explicit DescriptorSet(const Pipeline &pipeline); 10 | ~DescriptorSet(); 11 | 12 | static void Update(const std::vector &descriptorWrites); 13 | 14 | void BindDescriptor(const CommandBuffer &commandBuffer) const; 15 | 16 | const VkDescriptorSet &GetDescriptorSet() const { return descriptorSet; } 17 | 18 | private: 19 | VkPipelineLayout pipelineLayout; 20 | VkPipelineBindPoint pipelineBindPoint; 21 | VkDescriptorPool descriptorPool; 22 | VkDescriptorSet descriptorSet = VK_NULL_HANDLE; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /Sources/Graphics/Devices/Surface.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Export.hpp" 6 | 7 | namespace acid { 8 | class Instance; 9 | class LogicalDevice; 10 | class PhysicalDevice; 11 | class Window; 12 | 13 | class ACID_EXPORT Surface { 14 | friend class Graphics; 15 | public: 16 | Surface(const Instance &instance, const PhysicalDevice &physicalDevice, const LogicalDevice &logicalDevice, const Window &window); 17 | ~Surface(); 18 | 19 | operator const VkSurfaceKHR &() const { return surface; } 20 | 21 | const VkSurfaceKHR &GetSurface() const { return surface; } 22 | const VkSurfaceCapabilitiesKHR &GetCapabilities() const { return capabilities; } 23 | const VkSurfaceFormatKHR &GetFormat() const { return format; } 24 | 25 | private: 26 | const Instance &instance; 27 | const PhysicalDevice &physicalDevice; 28 | const LogicalDevice &logicalDevice; 29 | const Window &window; 30 | 31 | VkSurfaceKHR surface = VK_NULL_HANDLE; 32 | VkSurfaceCapabilitiesKHR capabilities = {}; 33 | VkSurfaceFormatKHR format = {}; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /Sources/Graphics/Images/ImageDepth.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Image.hpp" 4 | 5 | namespace acid { 6 | /** 7 | * @brief Resource that represents a depth stencil image. 8 | */ 9 | class ACID_EXPORT ImageDepth : public Image { 10 | public: 11 | explicit ImageDepth(const Vector2ui &extent, VkSampleCountFlagBits samples = VK_SAMPLE_COUNT_1_BIT); 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /Sources/Graphics/SubrenderHolder.cpp: -------------------------------------------------------------------------------- 1 | #include "SubrenderHolder.hpp" 2 | 3 | namespace acid { 4 | void SubrenderHolder::Clear() { 5 | stages.clear(); 6 | } 7 | 8 | void SubrenderHolder::RemoveSubrenderStage(const TypeId &id) { 9 | for (auto it = stages.begin(); it != stages.end();) { 10 | if (it->second == id) { 11 | it = stages.erase(it); 12 | } else { 13 | ++it; 14 | } 15 | } 16 | } 17 | 18 | void SubrenderHolder::RenderStage(const Pipeline::Stage &stage, const CommandBuffer &commandBuffer) { 19 | for (const auto &[stageIndex, typeId] : stages) { 20 | if (stageIndex.first != stage) { 21 | continue; 22 | } 23 | 24 | if (auto &subrender = subrenders[typeId]) { 25 | if (subrender->IsEnabled()) { 26 | subrender->Render(commandBuffer); 27 | } 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Sources/Guis/GuisSubrender.cpp: -------------------------------------------------------------------------------- 1 | #include "GuisSubrender.hpp" 2 | 3 | #include "Models/Vertex2d.hpp" 4 | #include "Uis/Uis.hpp" 5 | #include "Gui.hpp" 6 | 7 | namespace acid { 8 | GuisSubrender::GuisSubrender(const Pipeline::Stage &pipelineStage) : 9 | Subrender(pipelineStage), 10 | pipeline(pipelineStage, {"Shaders/Guis/Gui.vert", "Shaders/Guis/Gui.frag"}, {Vertex2d::GetVertexInput()}) { 11 | } 12 | 13 | void GuisSubrender::Render(const CommandBuffer &commandBuffer) { 14 | pipeline.BindPipeline(commandBuffer); 15 | 16 | for (const auto &screenObject : Uis::Get()->GetObjects()) { 17 | if (!screenObject->IsEnabled()) 18 | continue; 19 | 20 | if (auto object = dynamic_cast(screenObject)) 21 | object->CmdRender(commandBuffer, pipeline); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sources/Guis/GuisSubrender.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Subrender.hpp" 4 | #include "Graphics/Pipelines/PipelineGraphics.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT GuisSubrender : public Subrender { 8 | public: 9 | explicit GuisSubrender(const Pipeline::Stage &pipelineStage); 10 | 11 | void Render(const CommandBuffer &commandBuffer) override; 12 | 13 | private: 14 | PipelineGraphics pipeline; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /Sources/Inputs/Axes/MouseInputAxis.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Inputs/InputAxis.hpp" 4 | 5 | namespace acid { 6 | /** 7 | * @brief InputAxis input from a mouse. 8 | */ 9 | class ACID_EXPORT MouseInputAxis : public InputAxis::Registrar { 10 | inline static const bool Registered = Register("mouse"); 11 | public: 12 | /** 13 | * Creates a new axis mouse. 14 | * @param axis The axis on the mouse delta is being checked. 15 | */ 16 | explicit MouseInputAxis(uint8_t axis = 0); 17 | 18 | float GetAmount() const override; 19 | 20 | ArgumentDescription GetArgumentDescription() const override; 21 | 22 | uint8_t GetAxis() const { return axis; } 23 | void SetAxis(uint8_t axis) { this->axis = axis; } 24 | 25 | friend const Node &operator>>(const Node &node, MouseInputAxis &inputAxis); 26 | friend Node &operator<<(Node &node, const MouseInputAxis &inputAxis); 27 | 28 | private: 29 | uint8_t axis; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /Sources/Inputs/Buttons/KeyboardInputButton.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Inputs/InputButton.hpp" 4 | 5 | namespace acid { 6 | /** 7 | * @brief InputButton input from the keyboard input device. 8 | */ 9 | class ACID_EXPORT KeyboardInputButton : public InputButton::Registrar { 10 | inline static const bool Registered = Register("keyboard"); 11 | public: 12 | /** 13 | * Creates a new button keyboard. 14 | * @param key The key on the keyboard being checked. 15 | */ 16 | explicit KeyboardInputButton(Key key = Key::Unknown); 17 | 18 | bool IsDown() const override; 19 | 20 | InputAxis::ArgumentDescription GetArgumentDescription() const override; 21 | 22 | Key GetKey() const { return key; } 23 | void SetKey(Key key) { this->key = key; } 24 | 25 | friend const Node &operator>>(const Node &node, KeyboardInputButton &inputButton); 26 | friend Node &operator<<(Node &node, const KeyboardInputButton &inputButton); 27 | 28 | private: 29 | Key key; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /Sources/Inputs/Buttons/MouseInputButton.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Inputs/InputButton.hpp" 4 | 5 | namespace acid { 6 | /** 7 | * @brief InputButton input from the mouse input device. 8 | */ 9 | class ACID_EXPORT MouseInputButton : public InputButton::Registrar { 10 | inline static const bool Registered = Register("mouse"); 11 | public: 12 | /** 13 | * Creates a new button mouse. 14 | * @param button The button on the mouse being checked. 15 | */ 16 | explicit MouseInputButton(MouseButton button = MouseButton::_1); 17 | 18 | bool IsDown() const override; 19 | 20 | InputAxis::ArgumentDescription GetArgumentDescription() const override; 21 | 22 | MouseButton GetButton() const { return button; } 23 | void SetButton(MouseButton button) { this->button = button; } 24 | 25 | friend const Node &operator>>(const Node &node, MouseInputButton &inputButton); 26 | friend Node &operator<<(Node &node, const MouseInputButton &inputButton); 27 | 28 | private: 29 | MouseButton button; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /Sources/Inputs/InputDelay.cpp: -------------------------------------------------------------------------------- 1 | #include "InputDelay.hpp" 2 | 3 | namespace acid { 4 | InputDelay::InputDelay(const Time &delay, const Time &repeat) : 5 | elapsedDelay(delay), 6 | elapsedRepeat(repeat) { 7 | } 8 | 9 | void InputDelay::Update(bool keyIsDown) { 10 | if (keyIsDown) { 11 | delayOver = elapsedDelay.GetElapsed() != 0; 12 | } else { 13 | delayOver = false; 14 | elapsedDelay.SetStartTime(0s); 15 | elapsedRepeat.SetStartTime(0s); 16 | } 17 | } 18 | 19 | bool InputDelay::CanInput() { 20 | return delayOver && elapsedRepeat.GetElapsed() != 0; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sources/Inputs/InputDelay.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Engine/Engine.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT InputDelay { 7 | public: 8 | explicit InputDelay(const Time &delay = 0.06s, const Time &repeat = Time::Seconds(0.06f)); 9 | 10 | void Update(bool keyIsDown); 11 | 12 | bool CanInput(); 13 | 14 | const Time &GetDelay() const { return elapsedDelay.GetInterval(); } 15 | void SetDelay(const Time &delay) { elapsedDelay.SetInterval(delay); } 16 | 17 | const Time &GetRepeat() const { return elapsedRepeat.GetInterval(); } 18 | void SetRepeat(const Time &repeat) { elapsedRepeat.SetInterval(repeat); } 19 | 20 | private: 21 | ElapsedTime elapsedDelay; 22 | ElapsedTime elapsedRepeat; 23 | bool delayOver = false; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /Sources/Lights/Fog.cpp: -------------------------------------------------------------------------------- 1 | #include "Fog.hpp" 2 | 3 | namespace acid { 4 | Fog::Fog(const Colour &colour, float density, float gradient, float lowerLimit, float upperLimit) : 5 | colour(colour), 6 | density(density), 7 | gradient(gradient), 8 | lowerLimit(lowerLimit), 9 | upperLimit(upperLimit) { 10 | } 11 | 12 | void Fog::Start() { 13 | } 14 | 15 | void Fog::Update() { 16 | } 17 | 18 | const Node &operator>>(const Node &node, Fog &fog) { 19 | node["colour"].Get(fog.colour); 20 | node["density"].Get(fog.density); 21 | node["gradient"].Get(fog.gradient); 22 | node["lowerLimit"].Get(fog.lowerLimit); 23 | node["upperLimit"].Get(fog.upperLimit); 24 | return node; 25 | } 26 | 27 | Node &operator<<(Node &node, const Fog &fog) { 28 | node["colour"].Set(fog.colour); 29 | node["density"].Set(fog.density); 30 | node["gradient"].Set(fog.gradient); 31 | node["lowerLimit"].Set(fog.lowerLimit); 32 | node["upperLimit"].Set(fog.upperLimit); 33 | return node; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sources/Lights/Light.cpp: -------------------------------------------------------------------------------- 1 | #include "Light.hpp" 2 | 3 | #include "Scenes/Entity.hpp" 4 | 5 | namespace acid { 6 | Light::Light(const Colour &colour, float radius) : 7 | colour(colour), 8 | radius(radius) { 9 | } 10 | 11 | void Light::Start() { 12 | } 13 | 14 | void Light::Update() { 15 | } 16 | 17 | const Node &operator>>(const Node &node, Light &light) { 18 | node["colour"].Get(light.colour); 19 | node["radius"].Get(light.radius); 20 | return node; 21 | } 22 | 23 | Node &operator<<(Node &node, const Light &light) { 24 | node["colour"].Set(light.colour); 25 | node["radius"].Set(light.radius); 26 | return node; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sources/Maths/Colour.cpp: -------------------------------------------------------------------------------- 1 | #include "Colour.hpp" 2 | 3 | namespace acid { 4 | const Colour Colour::Clear(0x00000000, Type::RGBA); 5 | const Colour Colour::Black(0x000000FF, Type::RGBA); 6 | const Colour Colour::Grey(0x808080); 7 | const Colour Colour::Silver(0xC0C0C0); 8 | const Colour Colour::White(0xFFFFFF); 9 | const Colour Colour::Maroon(0x800000); 10 | const Colour Colour::Red(0xFF0000); 11 | const Colour Colour::Olive(0x808000); 12 | const Colour Colour::Yellow(0xFFFF00); 13 | const Colour Colour::Green(0x00FF00); 14 | const Colour Colour::Lime(0x008000); 15 | const Colour Colour::Teal(0x008080); 16 | const Colour Colour::Aqua(0x00FFFF); 17 | const Colour Colour::Navy(0x000080); 18 | const Colour Colour::Blue(0x0000FF); 19 | const Colour Colour::Purple(0x800080); 20 | const Colour Colour::Fuchsia(0xFF00FF); 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Maths/ElapsedTime.cpp: -------------------------------------------------------------------------------- 1 | #include "ElapsedTime.hpp" 2 | 3 | #include 4 | 5 | namespace acid { 6 | ElapsedTime::ElapsedTime(const Time &interval) : 7 | startTime(Time::Now()), 8 | interval(interval) { 9 | } 10 | 11 | uint32_t ElapsedTime::GetElapsed() { 12 | auto now = Time::Now(); 13 | auto elapsed = static_cast(std::floor((now - startTime) / interval)); 14 | 15 | if (elapsed != 0.0f) { 16 | startTime = now; 17 | } 18 | 19 | return elapsed; 20 | } 21 | 22 | const Node &operator>>(const Node &node, ElapsedTime &elapsedTime) { 23 | node >> elapsedTime.interval; 24 | return node; 25 | } 26 | 27 | Node &operator<<(Node &node, const ElapsedTime &elapsedTime) { 28 | node << elapsedTime.interval; 29 | return node; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Sources/Maths/ElapsedTime.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Time.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT ElapsedTime { 7 | public: 8 | explicit ElapsedTime(const Time &interval = -1s); 9 | 10 | uint32_t GetElapsed(); 11 | 12 | const Time &GetStartTime() const { return startTime; } 13 | void SetStartTime(const Time &startTime) { this->startTime = startTime; } 14 | 15 | const Time &GetInterval() const { return interval; } 16 | void SetInterval(const Time &interval) { this->interval = interval; } 17 | 18 | friend const Node &operator>>(const Node &node, ElapsedTime &elapsedTime); 19 | friend Node &operator<<(Node &node, const ElapsedTime &elapsedTime); 20 | 21 | private: 22 | Time startTime; 23 | Time interval; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /Sources/Maths/Maths.cpp: -------------------------------------------------------------------------------- 1 | #include "Maths.hpp" 2 | 3 | #include 4 | 5 | namespace acid { 6 | static std::random_device RandomDevice; 7 | static std::mt19937 RandomGenerator(RandomDevice()); 8 | 9 | float Maths::Random(float min, float max) { 10 | std::uniform_real_distribution dist(min, max); 11 | return dist(RandomGenerator); 12 | } 13 | 14 | float Maths::RandomNormal(float standardDeviation, float mean) { 15 | std::normal_distribution dist(mean, standardDeviation); 16 | return dist(RandomGenerator); 17 | } 18 | 19 | float Maths::RandomLog(float min, float max) { 20 | auto logLower = std::log(min); 21 | auto logUpper = std::log(max); 22 | auto raw = Random(0.0f, 1.0f); 23 | 24 | auto result = std::exp(raw * (logUpper - logLower) + logLower); 25 | 26 | if (result < min) { 27 | result = min; 28 | } else if (result > max) { 29 | result = max; 30 | } 31 | 32 | return result; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sources/Maths/Vector4.cpp: -------------------------------------------------------------------------------- 1 | #include "Vector4.hpp" 2 | 3 | namespace acid { 4 | template 5 | const Vector4 Vector4::Zero(0.0f); 6 | template 7 | const Vector4 Vector4::One(1.0f); 8 | template 9 | const Vector4 Vector4::Infinity(std::numeric_limits::infinity()); 10 | } 11 | -------------------------------------------------------------------------------- /Sources/Meshes/MeshesSubrender.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Subrender.hpp" 4 | #include "Graphics/Buffers/UniformHandler.hpp" 5 | #include "Graphics/Pipelines/PipelineGraphics.hpp" 6 | 7 | namespace acid { 8 | class ACID_EXPORT MeshesSubrender : public Subrender { 9 | public: 10 | enum class Sort { 11 | None, Front, Back 12 | }; 13 | 14 | explicit MeshesSubrender(const Pipeline::Stage &pipelineStage, Sort sort = Sort::None); 15 | 16 | void Render(const CommandBuffer &commandBuffer) override; 17 | 18 | private: 19 | Sort sort; 20 | UniformHandler uniformScene; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /Sources/Models/Shapes/PatternMesh.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Models/Model.hpp" 4 | #include "Models/Vertex3d.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT PatternMesh : public Model { 8 | public: 9 | PatternMesh(float sideLength, float squareSize, uint32_t vertexCount, float uvScale); 10 | 11 | protected: 12 | virtual Vertex3d GetVertex(uint32_t col, uint32_t row); 13 | 14 | void GenerateMesh(); 15 | 16 | float sideLength; 17 | float squareSize; 18 | uint32_t vertexCount; 19 | float uvScale; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Models/Shapes/SimpleMesh.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Models/Model.hpp" 4 | #include "Models/Vertex3d.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT SimpleMesh : public Model { 8 | public: 9 | SimpleMesh(float sideLength, float squareSize, uint32_t vertexCount, float uvScale); 10 | 11 | protected: 12 | virtual Vertex3d GetVertex(uint32_t col, uint32_t row); 13 | 14 | void GenerateMesh(); 15 | 16 | float sideLength; 17 | float squareSize; 18 | uint32_t vertexCount; 19 | float uvScale; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Network/Ftp/FtpDataChannel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Network/Tcp/TcpSocket.hpp" 4 | 5 | namespace acid { 6 | class Ftp; 7 | class FtpResponse; 8 | 9 | /** 10 | * @brief Utility class for exchanging datas with the server on the data channel. 11 | */ 12 | class ACID_EXPORT FtpDataChannel { 13 | public: 14 | /** 15 | * @brief Enumeration of transfer modes. 16 | */ 17 | enum class Mode { 18 | /// Binary mode (file is transfered as a sequence of bytes). 19 | Binary, 20 | /// Text mode using ASCII encoding. 21 | Ascii, 22 | /// Text mode using EBCDIC encoding. 23 | Ebcdic 24 | }; 25 | 26 | explicit FtpDataChannel(Ftp &owner); 27 | 28 | FtpResponse Open(Mode mode); 29 | 30 | void Send(std::istream &stream); 31 | 32 | void Receive(std::ostream &stream); 33 | 34 | private: 35 | /// Reference to the owner Ftp instance. 36 | Ftp &ftp; 37 | /// Socket used for data transfers. 38 | TcpSocket dataSocket; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /Sources/Network/Ftp/FtpResponse.cpp: -------------------------------------------------------------------------------- 1 | #include "FtpResponse.hpp" 2 | 3 | namespace acid { 4 | FtpResponse::FtpResponse(Status code, std::string message) : 5 | status(code), 6 | message(std::move(message)) { 7 | } 8 | 9 | bool FtpResponse::IsOk() const { 10 | return static_cast(status) < 400; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Network/Ftp/FtpResponseDirectory.cpp: -------------------------------------------------------------------------------- 1 | #include "FtpResponseDirectory.hpp" 2 | 3 | namespace acid { 4 | FtpResponseDirectory::FtpResponseDirectory(const FtpResponse &response) : 5 | FtpResponse(response) { 6 | if (IsOk()) { 7 | // Extract the directory from the server response 8 | auto begin = GetFullMessage().find('"', 0); 9 | auto end = GetFullMessage().find('"', begin + 1); 10 | directory = GetFullMessage().substr(begin + 1, end - begin - 1); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sources/Network/Ftp/FtpResponseDirectory.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "FtpResponse.hpp" 4 | 5 | namespace acid { 6 | /** 7 | * @brief Specialization of FTP response returning a directory. 8 | */ 9 | class ACID_EXPORT FtpResponseDirectory : public FtpResponse { 10 | public: 11 | /** 12 | * Default constructor. 13 | * @param response Source response. 14 | */ 15 | FtpResponseDirectory(const FtpResponse &response); 16 | 17 | /** 18 | * Get the directory returned in the response. 19 | * @return Directory name. 20 | */ 21 | const std::string &GetDirectory() const { return directory; } 22 | 23 | private: 24 | /// Directory extracted from the response message. 25 | std::string directory; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Network/Ftp/FtpResponseListing.cpp: -------------------------------------------------------------------------------- 1 | #include "FtpResponseListing.hpp" 2 | 3 | namespace acid { 4 | FtpResponseListing::FtpResponseListing(const FtpResponse &response, const std::string &data) : 5 | FtpResponse(response) { 6 | if (IsOk()) { 7 | // Fill the array of strings 8 | std::string::size_type lastPos = 0; 9 | 10 | for (auto pos = data.find("\r\n"); pos != std::string::npos; pos = data.find("\r\n", lastPos)) { 11 | listing.emplace_back(data.substr(lastPos, pos - lastPos)); 12 | lastPos = pos + 2; 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sources/Network/Ftp/FtpResponseListing.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "FtpResponse.hpp" 6 | 7 | namespace acid { 8 | /** 9 | * @brief Specialization of FTP response returning a filename listing. 10 | */ 11 | class ACID_EXPORT FtpResponseListing : public FtpResponse { 12 | public: 13 | /** 14 | * Default constructor. 15 | * @param response Source response. 16 | * @param data Data containing the raw listing. 17 | */ 18 | FtpResponseListing(const FtpResponse &response, const std::string &data); 19 | 20 | /** 21 | * Return the array of directory/file names. 22 | * @return Array containing the requested listing. 23 | */ 24 | const std::vector &GetListing() const { return listing; } 25 | 26 | private: 27 | /// Directory/file names extracted from the data. 28 | std::vector listing; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Particles/Emitters/CircleEmitter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Emitter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT CircleEmitter : public Emitter::Registrar { 7 | inline static const bool Registered = Register("circle"); 8 | public: 9 | explicit CircleEmitter(float radius = 1.0f, const Vector3f &heading = Vector3f::Up); 10 | 11 | Vector3f GeneratePosition() const override; 12 | 13 | float GetRadius() const { return radius; } 14 | void SetRadius(float radius) { this->radius = radius; } 15 | 16 | const Vector3f &GetHeading() const { return heading; } 17 | void SetHeading(const Vector3f &heading) { this->heading = heading; } 18 | 19 | friend const Node &operator>>(const Node &node, CircleEmitter &emitter); 20 | friend Node &operator<<(Node &node, const CircleEmitter &emitter); 21 | 22 | private: 23 | float radius; 24 | Vector3f heading; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Particles/Emitters/Emitter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Utils/StreamFactory.hpp" 4 | #include "Maths/Vector3.hpp" 5 | 6 | namespace acid { 7 | /** 8 | * @brief Component interface that defines a emitter volume. 9 | */ 10 | class ACID_EXPORT Emitter : public StreamFactory { 11 | public: 12 | virtual ~Emitter() = default; 13 | 14 | /** 15 | * Creates a new objects position. 16 | * @return The new objects position. 17 | */ 18 | virtual Vector3f GeneratePosition() const = 0; 19 | 20 | static Vector3f RandomUnitVector() { 21 | auto theta = Maths::Random(0.0f, 1.0f) * 2.0f * Maths::PI; 22 | auto z = Maths::Random(0.0f, 1.0f) * 2.0f - 1.0f; 23 | auto rootOneMinusZSquared = std::sqrt(1.0f - z * z); 24 | auto x = rootOneMinusZSquared * std::cos(theta); 25 | auto y = rootOneMinusZSquared * std::sin(theta); 26 | return {x, y, z}; 27 | } 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Particles/Emitters/LineEmitter.cpp: -------------------------------------------------------------------------------- 1 | #include "LineEmitter.hpp" 2 | 3 | #include "Maths/Maths.hpp" 4 | #include "Scenes/Entity.hpp" 5 | 6 | namespace acid { 7 | LineEmitter::LineEmitter(float length, const Vector3f &axis) : 8 | length(length), 9 | axis(axis.Normalize()) { 10 | } 11 | 12 | Vector3f LineEmitter::GeneratePosition() const { 13 | return axis * length * Maths::Random(-0.5f, 0.5f); 14 | } 15 | 16 | const Node &operator>>(const Node &node, LineEmitter &emitter) { 17 | node["length"].Get(emitter.length); 18 | node["axis"].Get(emitter.axis); 19 | return node; 20 | } 21 | 22 | Node &operator<<(Node &node, const LineEmitter &emitter) { 23 | node["length"].Set(emitter.length); 24 | node["axis"].Set(emitter.axis); 25 | return node; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Particles/Emitters/LineEmitter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Emitter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT LineEmitter : public Emitter::Registrar { 7 | inline static const bool Registered = Register("line"); 8 | public: 9 | explicit LineEmitter(float length = 1.0f, const Vector3f &axis = Vector3f::Right); 10 | 11 | Vector3f GeneratePosition() const override; 12 | 13 | float GetLength() const { return length; } 14 | void SetLength(float length) { this->length = length; } 15 | 16 | const Vector3f &GetAxis() const { return axis; } 17 | void SetAxis(const Vector3f &axis) { this->axis = axis; } 18 | 19 | friend const Node &operator>>(const Node &node, LineEmitter &emitter); 20 | friend Node &operator<<(Node &node, const LineEmitter &emitter); 21 | 22 | private: 23 | float length; 24 | Vector3f axis; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Particles/Emitters/PointEmitter.cpp: -------------------------------------------------------------------------------- 1 | #include "PointEmitter.hpp" 2 | 3 | #include "Scenes/Entity.hpp" 4 | 5 | namespace acid { 6 | PointEmitter::PointEmitter() { 7 | } 8 | 9 | Vector3f PointEmitter::GeneratePosition() const { 10 | return point; 11 | } 12 | 13 | const Node &operator>>(const Node &node, PointEmitter &emitter) { 14 | node["point"].Get(emitter.point); 15 | return node; 16 | } 17 | 18 | Node &operator<<(Node &node, const PointEmitter &emitter) { 19 | node["point"].Set(emitter.point); 20 | return node; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sources/Particles/Emitters/PointEmitter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Emitter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT PointEmitter : public Emitter::Registrar { 7 | inline static const bool Registered = Register("point"); 8 | public: 9 | PointEmitter(); 10 | 11 | Vector3f GeneratePosition() const override; 12 | 13 | const Vector3f &GetPoint() const { return point; } 14 | void SetPoint(const Vector3f &point) { this->point = point; } 15 | 16 | friend const Node &operator>>(const Node &node, PointEmitter &emitter); 17 | friend Node &operator<<(Node &node, const PointEmitter &emitter); 18 | 19 | private: 20 | Vector3f point; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /Sources/Particles/Emitters/SphereEmitter.cpp: -------------------------------------------------------------------------------- 1 | #include "SphereEmitter.hpp" 2 | 3 | #include "Maths/Maths.hpp" 4 | #include "Maths/Vector2.hpp" 5 | 6 | namespace acid { 7 | SphereEmitter::SphereEmitter(float radius) : 8 | radius(radius) { 9 | } 10 | 11 | Vector3f SphereEmitter::GeneratePosition() const { 12 | auto a = Maths::Random(0.0f, 1.0f); 13 | auto b = Maths::Random(0.0f, 1.0f); 14 | if (a > b) 15 | std::swap(a, b); 16 | 17 | auto randX = b * std::cos(2.0f * Maths::PI * (a / b)); 18 | auto randY = b * std::sin(2.0f * Maths::PI * (a / b)); 19 | auto distance = Vector2f(randX, randY).Length(); 20 | return radius * distance * RandomUnitVector(); 21 | } 22 | 23 | const Node &operator>>(const Node &node, SphereEmitter &emitter) { 24 | node["radius"].Get(emitter.radius); 25 | return node; 26 | } 27 | 28 | Node &operator<<(Node &node, const SphereEmitter &emitter) { 29 | node["radius"].Set(emitter.radius); 30 | return node; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Sources/Particles/Emitters/SphereEmitter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Emitter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT SphereEmitter : public Emitter::Registrar { 7 | inline static const bool Registered = Register("sphere"); 8 | public: 9 | explicit SphereEmitter(float radius = 1.0f); 10 | 11 | Vector3f GeneratePosition() const override; 12 | 13 | float GetRadius() const { return radius; } 14 | void SetRadius(float radius) { this->radius = radius; } 15 | 16 | friend const Node &operator>>(const Node &node, SphereEmitter &emitter); 17 | friend Node &operator<<(Node &node, const SphereEmitter &emitter); 18 | 19 | private: 20 | float radius; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /Sources/Particles/Particles.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Scenes/System.hpp" 4 | #include "Particle.hpp" 5 | 6 | namespace acid { 7 | /** 8 | * @brief A manager that manages particles. 9 | */ 10 | class ACID_EXPORT Particles : public System { 11 | public: 12 | using ParticlesContainer = std::map, std::vector>; 13 | 14 | Particles(); 15 | 16 | void Update() override; 17 | 18 | void AddParticle(Particle &&particle); 19 | //void RemoveParticle(const Particle &particle); 20 | 21 | /** 22 | * Clears all particles from the scene. 23 | */ 24 | void Clear(); 25 | 26 | /** 27 | * Gets a list of all particles. 28 | * @return All particles. 29 | */ 30 | const ParticlesContainer &GetParticles() const { return particles; } 31 | 32 | private: 33 | ParticlesContainer particles; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /Sources/Particles/ParticlesSubrender.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Subrender.hpp" 4 | #include "Graphics/Buffers/UniformHandler.hpp" 5 | #include "Graphics/Pipelines/PipelineGraphics.hpp" 6 | 7 | namespace acid { 8 | class ACID_EXPORT ParticlesSubrender : public Subrender { 9 | public: 10 | explicit ParticlesSubrender(const Pipeline::Stage &pipelineStage); 11 | 12 | void Render(const CommandBuffer &commandBuffer) override; 13 | 14 | private: 15 | PipelineGraphics pipeline; 16 | UniformHandler uniformScene; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /Sources/Physics/Colliders/CapsuleCollider.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Collider.hpp" 4 | 5 | class btCapsuleShape; 6 | 7 | namespace acid { 8 | class ACID_EXPORT CapsuleCollider : public Collider::Registrar { 9 | inline static const bool Registered = Register("capsule"); 10 | public: 11 | explicit CapsuleCollider(float radius = 0.5f, float height = 1.0f, const Transform &localTransform = {}); 12 | ~CapsuleCollider(); 13 | 14 | btCollisionShape *GetCollisionShape() const override; 15 | 16 | float GetRadius() const { return radius; } 17 | void SetRadius(float radius); 18 | 19 | float GetHeight() const { return height; } 20 | void SetHeight(float height); 21 | 22 | friend const Node &operator>>(const Node &node, CapsuleCollider &collider); 23 | friend Node &operator<<(Node &node, const CapsuleCollider &collider); 24 | 25 | private: 26 | std::unique_ptr shape; 27 | float radius; 28 | float height; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Physics/Colliders/ConeCollider.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Collider.hpp" 4 | 5 | class btConeShape; 6 | 7 | namespace acid { 8 | class ACID_EXPORT ConeCollider : public Collider::Registrar { 9 | inline static const bool Registered = Register("cone"); 10 | public: 11 | explicit ConeCollider(float radius = 1.0f, float height = 1.0f, const Transform &localTransform = {}); 12 | ~ConeCollider(); 13 | 14 | btCollisionShape *GetCollisionShape() const override; 15 | 16 | float GetRadius() const { return radius; } 17 | void SetRadius(float radius); 18 | 19 | float GetHeight() const { return height; } 20 | void SetHeight(float height); 21 | 22 | friend const Node &operator>>(const Node &node, ConeCollider &collider); 23 | friend Node &operator<<(Node &node, const ConeCollider &collider); 24 | 25 | private: 26 | std::unique_ptr shape; 27 | float radius; 28 | float height; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Physics/Colliders/ConvexHullCollider.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Models/Model.hpp" 4 | #include "Collider.hpp" 5 | 6 | class btConvexHullShape; 7 | 8 | namespace acid { 9 | class ACID_EXPORT ConvexHullCollider : public Collider::Registrar { 10 | inline static const bool Registered = Register("convexHull"); 11 | public: 12 | explicit ConvexHullCollider(const std::vector &pointCloud = {}, const Transform &localTransform = {}); 13 | ~ConvexHullCollider(); 14 | 15 | btCollisionShape *GetCollisionShape() const override; 16 | 17 | uint32_t GetPointCount() const { return pointCount; } 18 | void SetPointCount(const std::vector &pointCloud); 19 | 20 | friend const Node &operator>>(const Node &node, ConvexHullCollider &collider); 21 | friend Node &operator<<(Node &node, const ConvexHullCollider &collider); 22 | 23 | private: 24 | std::unique_ptr shape; 25 | std::shared_ptr model; 26 | uint32_t pointCount = 0; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /Sources/Physics/Colliders/CubeCollider.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Collider.hpp" 4 | 5 | class btBoxShape; 6 | 7 | namespace acid { 8 | class ACID_EXPORT CubeCollider : public Collider::Registrar { 9 | inline static const bool Registered = Register("cube"); 10 | public: 11 | explicit CubeCollider(const Vector3f &extents = Vector3f(1.0f), const Transform &localTransform = {}); 12 | ~CubeCollider(); 13 | 14 | btCollisionShape *GetCollisionShape() const override; 15 | 16 | const Vector3f &GetExtents() const { return extents; } 17 | void SetExtents(const Vector3f &extents); 18 | 19 | friend const Node &operator>>(const Node &node, CubeCollider &collider); 20 | friend Node &operator<<(Node &node, const CubeCollider &collider); 21 | 22 | private: 23 | std::unique_ptr shape; 24 | Vector3f extents; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Physics/Colliders/CylinderCollider.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Collider.hpp" 4 | 5 | class btCylinderShape; 6 | 7 | namespace acid { 8 | class ACID_EXPORT CylinderCollider : public Collider::Registrar { 9 | inline static const bool Registered = Register("cylinder"); 10 | public: 11 | explicit CylinderCollider(float radius = 1.0f, float height = 1.0f, const Transform &localTransform = {}); 12 | ~CylinderCollider(); 13 | 14 | btCollisionShape *GetCollisionShape() const override; 15 | 16 | float GetRadius() const { return radius; } 17 | void SetRadius(float radius); 18 | 19 | float GetHeight() const { return height; } 20 | void SetHeight(float height); 21 | 22 | friend const Node &operator>>(const Node &node, CylinderCollider &collider); 23 | friend Node &operator<<(Node &node, const CylinderCollider &collider); 24 | 25 | private: 26 | std::unique_ptr shape; 27 | float radius; 28 | float height; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Physics/Colliders/SphereCollider.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Collider.hpp" 4 | 5 | class btSphereShape; 6 | 7 | namespace acid { 8 | class ACID_EXPORT SphereCollider : public Collider::Registrar { 9 | inline static const bool Registered = Register("sphere"); 10 | public: 11 | explicit SphereCollider(float radius = 0.5f, const Transform &localTransform = {}); 12 | ~SphereCollider(); 13 | 14 | btCollisionShape *GetCollisionShape() const override; 15 | 16 | float GetRadius() const { return radius; } 17 | void SetRadius(float radius); 18 | 19 | friend const Node &operator>>(const Node &node, SphereCollider &collider); 20 | friend Node &operator<<(Node &node, const SphereCollider &collider); 21 | 22 | private: 23 | std::unique_ptr shape; 24 | float radius; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Physics/Force.cpp: -------------------------------------------------------------------------------- 1 | #include "Force.hpp" 2 | 3 | namespace acid { 4 | Force::Force(const Vector3f &force, const Vector3f &position) : 5 | force(force), 6 | neverExpires(true), 7 | position(position) { 8 | } 9 | 10 | Force::Force(const Vector3f &force, const Time &time, const Vector3f &position) : 11 | force(force), 12 | neverExpires(false), 13 | timeLeft(time), 14 | position(position) { 15 | } 16 | 17 | void Force::Update(const Time &delta) { 18 | timeLeft -= delta; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sources/Post/Filters/BlitFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "BlitFilter.hpp" 2 | 3 | namespace acid { 4 | BlitFilter::BlitFilter(const Pipeline::Stage &pipelineStage) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Blit.frag"}) { 6 | } 7 | 8 | void BlitFilter::Render(const CommandBuffer &commandBuffer) { 9 | // Updates descriptors. 10 | descriptorSet.Push("samplerColour", Graphics::Get()->GetAttachment("swapchain")); 11 | 12 | if (!descriptorSet.Update(pipeline)) 13 | return; 14 | 15 | // Draws the object. 16 | pipeline.BindPipeline(commandBuffer); 17 | 18 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 19 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Post/Filters/BlitFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace acid { 6 | class ACID_EXPORT BlitFilter : public PostFilter { 7 | public: 8 | explicit BlitFilter(const Pipeline::Stage &pipelineStage); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Post/Filters/BlurFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Maths/Vector2.hpp" 4 | #include "Post/PostFilter.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT BlurFilter : public PostFilter { 8 | public: 9 | enum class Type { 10 | _5 = 5, 11 | _9 = 9, 12 | _13 = 13 13 | }; 14 | 15 | explicit BlurFilter(const Pipeline::Stage &pipelineStage, const Vector2f &direction, Type type = Type::_9); 16 | 17 | void Render(const CommandBuffer &commandBuffer) override; 18 | 19 | const Vector2f &GetDirection() const { return direction; } 20 | void SetDirection(const Vector2f &direction) { this->direction = direction; } 21 | 22 | private: 23 | std::vector GetDefines(const Type &type); 24 | 25 | PushHandler pushScene; 26 | 27 | Type type; 28 | Vector2f direction; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Post/Filters/DarkenFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "DarkenFilter.hpp" 2 | 3 | namespace acid { 4 | DarkenFilter::DarkenFilter(const Pipeline::Stage &pipelineStage, float factor) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Darken.frag"}), 6 | factor(factor) { 7 | } 8 | 9 | void DarkenFilter::Render(const CommandBuffer &commandBuffer) { 10 | // Updates uniforms. 11 | pushScene.Push("factor", factor); 12 | 13 | // Updates descriptors. 14 | descriptorSet.Push("PushScene", pushScene); 15 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 16 | 17 | if (!descriptorSet.Update(pipeline)) 18 | return; 19 | 20 | // Draws the object. 21 | pipeline.BindPipeline(commandBuffer); 22 | 23 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 24 | pushScene.BindPush(commandBuffer, pipeline); 25 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Post/Filters/DarkenFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT DarkenFilter : public PostFilter { 7 | public: 8 | explicit DarkenFilter(const Pipeline::Stage &pipelineStage, float factor = 0.5f); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | 12 | float GetFactor() const { return factor; } 13 | void SetFactor(float factor) { this->factor = factor; } 14 | 15 | private: 16 | PushHandler pushScene; 17 | 18 | float factor; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /Sources/Post/Filters/DefaultFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "DefaultFilter.hpp" 2 | 3 | namespace acid { 4 | DefaultFilter::DefaultFilter(const Pipeline::Stage &pipelineStage, bool lastFilter) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Default.frag"}), 6 | lastFilter(lastFilter) { 7 | } 8 | 9 | void DefaultFilter::Render(const CommandBuffer &commandBuffer) { 10 | // Updates descriptors. 11 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 12 | 13 | if (!descriptorSet.Update(pipeline)) 14 | return; 15 | 16 | // Draws the object. 17 | pipeline.BindPipeline(commandBuffer); 18 | 19 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 20 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 21 | 22 | // Resets switching for next pass. 23 | if (lastFilter) { 24 | GlobalSwitching = 0; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Post/Filters/DefaultFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT DefaultFilter : public PostFilter { 7 | public: 8 | explicit DefaultFilter(const Pipeline::Stage &pipelineStage, bool lastFilter = false); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | 12 | private: 13 | bool lastFilter; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /Sources/Post/Filters/EmbossFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "EmbossFilter.hpp" 2 | 3 | namespace acid { 4 | EmbossFilter::EmbossFilter(const Pipeline::Stage &pipelineStage) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Emboss.frag"}) { 6 | } 7 | 8 | void EmbossFilter::Render(const CommandBuffer &commandBuffer) { 9 | // Updates descriptors. 10 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 11 | 12 | if (!descriptorSet.Update(pipeline)) 13 | return; 14 | 15 | // Draws the object. 16 | pipeline.BindPipeline(commandBuffer); 17 | 18 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 19 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Post/Filters/EmbossFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT EmbossFilter : public PostFilter { 7 | public: 8 | explicit EmbossFilter(const Pipeline::Stage &pipelineStage); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Post/Filters/FxaaFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "FxaaFilter.hpp" 2 | 3 | namespace acid { 4 | FxaaFilter::FxaaFilter(const Pipeline::Stage &pipelineStage, float spanMax) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Fxaa.frag"}), 6 | spanMax(spanMax) { 7 | } 8 | 9 | void FxaaFilter::Render(const CommandBuffer &commandBuffer) { 10 | // Updates uniforms. 11 | pushScene.Push("spanMax", spanMax); 12 | 13 | // Updates descriptors. 14 | descriptorSet.Push("PushScene", pushScene); 15 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 16 | 17 | if (!descriptorSet.Update(pipeline)) 18 | return; 19 | 20 | // Binds the pipeline. 21 | pipeline.BindPipeline(commandBuffer); 22 | 23 | // Draws the object. 24 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 25 | pushScene.BindPush(commandBuffer, pipeline); 26 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sources/Post/Filters/FxaaFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT FxaaFilter : public PostFilter { 7 | public: 8 | explicit FxaaFilter(const Pipeline::Stage &pipelineStage, float spanMax = 8.0f); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | 12 | float GetSpanMax() const { return spanMax; } 13 | void SetSpanMax(float spanMax) { this->spanMax = spanMax; } 14 | 15 | private: 16 | PushHandler pushScene; 17 | 18 | float spanMax; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /Sources/Post/Filters/GrainFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "GrainFilter.hpp" 2 | 3 | namespace acid { 4 | GrainFilter::GrainFilter(const Pipeline::Stage &pipelineStage, float strength) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Grain.frag"}), 6 | strength(strength) { 7 | } 8 | 9 | void GrainFilter::Render(const CommandBuffer &commandBuffer) { 10 | // Updates uniforms. 11 | pushScene.Push("strength", strength); 12 | 13 | // Updates descriptors. 14 | descriptorSet.Push("PushScene", pushScene); 15 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 16 | 17 | if (!descriptorSet.Update(pipeline)) 18 | return; 19 | 20 | // Binds the pipeline. 21 | pipeline.BindPipeline(commandBuffer); 22 | 23 | // Draws the object. 24 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 25 | pushScene.BindPush(commandBuffer, pipeline); 26 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sources/Post/Filters/GrainFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT GrainFilter : public PostFilter { 7 | public: 8 | explicit GrainFilter(const Pipeline::Stage &pipelineStage, float strength = 2.3f); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | 12 | float GetStrength() const { return strength; } 13 | void SetStrength(float strength) { this->strength = strength; } 14 | 15 | private: 16 | PushHandler pushScene; 17 | 18 | float strength; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /Sources/Post/Filters/GreyFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "GreyFilter.hpp" 2 | 3 | namespace acid { 4 | GreyFilter::GreyFilter(const Pipeline::Stage &pipelineStage) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Grey.frag"}) { 6 | } 7 | 8 | void GreyFilter::Render(const CommandBuffer &commandBuffer) { 9 | // Updates descriptors. 10 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 11 | 12 | if (!descriptorSet.Update(pipeline)) 13 | return; 14 | 15 | // Draws the object. 16 | pipeline.BindPipeline(commandBuffer); 17 | 18 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 19 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Post/Filters/GreyFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT GreyFilter : public PostFilter { 7 | public: 8 | explicit GreyFilter(const Pipeline::Stage &pipelineStage); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Post/Filters/LensflareFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Maths/Vector3.hpp" 4 | #include "Post/PostFilter.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT LensflareFilter : public PostFilter { 8 | public: 9 | explicit LensflareFilter(const Pipeline::Stage &pipelineStage); 10 | 11 | void Render(const CommandBuffer &commandBuffer) override; 12 | 13 | const Vector3f &GetSunPosition() const { return sunPosition; } 14 | void SetSunPosition(const Vector3f &sunPosition); 15 | 16 | float GetSunHeight() const { return sunHeight; } 17 | void SetSunHeight(float sunHeight) { this->sunHeight = sunHeight; } 18 | 19 | private: 20 | PushHandler pushScene; 21 | 22 | Vector3f sunPosition; 23 | float sunHeight = 0.0f; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /Sources/Post/Filters/NegativeFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "NegativeFilter.hpp" 2 | 3 | namespace acid { 4 | NegativeFilter::NegativeFilter(const Pipeline::Stage &pipelineStage) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Negative.frag"}) { 6 | } 7 | 8 | void NegativeFilter::Render(const CommandBuffer &commandBuffer) { 9 | // Updates descriptors. 10 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 11 | 12 | if (!descriptorSet.Update(pipeline)) 13 | return; 14 | 15 | // Draws the object. 16 | pipeline.BindPipeline(commandBuffer); 17 | 18 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 19 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Post/Filters/NegativeFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT NegativeFilter : public PostFilter { 7 | public: 8 | explicit NegativeFilter(const Pipeline::Stage &pipelineStage); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Post/Filters/PixelFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "PixelFilter.hpp" 2 | 3 | namespace acid { 4 | PixelFilter::PixelFilter(const Pipeline::Stage &pipelineStage, float pixelSize) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Pixel.frag"}), 6 | pixelSize(pixelSize) { 7 | } 8 | 9 | void PixelFilter::Render(const CommandBuffer &commandBuffer) { 10 | // Updates uniforms. 11 | pushScene.Push("pixelSize", pixelSize); 12 | 13 | // Updates descriptors. 14 | descriptorSet.Push("PushScene", pushScene); 15 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 16 | 17 | if (!descriptorSet.Update(pipeline)) 18 | return; 19 | 20 | // Draws the object. 21 | pipeline.BindPipeline(commandBuffer); 22 | 23 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 24 | pushScene.BindPush(commandBuffer, pipeline); 25 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Post/Filters/PixelFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT PixelFilter : public PostFilter { 7 | public: 8 | explicit PixelFilter(const Pipeline::Stage &pipelineStage, float pixelSize = 2.0f); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | 12 | float GetPixelSize() const { return pixelSize; } 13 | void SetPixelSize(float pixelSize) { this->pixelSize = pixelSize; } 14 | 15 | private: 16 | PushHandler pushScene; 17 | 18 | float pixelSize; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /Sources/Post/Filters/SepiaFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "SepiaFilter.hpp" 2 | 3 | namespace acid { 4 | SepiaFilter::SepiaFilter(const Pipeline::Stage &pipelineStage) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Sepia.frag"}) { 6 | } 7 | 8 | void SepiaFilter::Render(const CommandBuffer &commandBuffer) { 9 | // Updates descriptors. 10 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 11 | 12 | if (!descriptorSet.Update(pipeline)) 13 | return; 14 | 15 | // Draws the object. 16 | pipeline.BindPipeline(commandBuffer); 17 | 18 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 19 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Post/Filters/SepiaFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT SepiaFilter : public PostFilter { 7 | public: 8 | explicit SepiaFilter(const Pipeline::Stage &pipelineStage); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Post/Filters/SsaoFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Utils/Future.hpp" 4 | #include "Post/PostFilter.hpp" 5 | #include "Maths/Vector3.hpp" 6 | 7 | namespace acid { 8 | class ACID_EXPORT SsaoFilter : public PostFilter { 9 | public: 10 | explicit SsaoFilter(const Pipeline::Stage &pipelineStage); 11 | 12 | void Render(const CommandBuffer &commandBuffer) override; 13 | 14 | private: 15 | std::vector GetDefines() const; 16 | 17 | static std::shared_ptr ComputeNoise(uint32_t size); 18 | 19 | UniformHandler uniformScene; 20 | 21 | Future> noise; 22 | std::vector kernel; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /Sources/Post/Filters/TiltshiftFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT TiltshiftFilter : public PostFilter { 7 | public: 8 | explicit TiltshiftFilter(const Pipeline::Stage &pipelineStage, float blurAmount = 1.0f, float centre = 1.1f, float stepSize = 0.004f, 9 | float steps = 3.0f); 10 | 11 | void Render(const CommandBuffer &commandBuffer) override; 12 | 13 | float GetBlurAmount() const { return blurAmount; } 14 | void SetBlurAmount(float blurAmount) { this->blurAmount = blurAmount; } 15 | 16 | float GetCentre() const { return centre; } 17 | void SetCentre(float centre) { this->centre = centre; } 18 | 19 | float GetStepSize() const { return stepSize; } 20 | void SetStepSize(float stepSize) { this->stepSize = stepSize; } 21 | 22 | float GetSteps() const { return steps; } 23 | void SetSteps(float steps) { this->steps = steps; } 24 | 25 | private: 26 | PushHandler pushScene; 27 | 28 | float blurAmount; 29 | float centre; 30 | float stepSize; 31 | float steps; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /Sources/Post/Filters/ToneFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "ToneFilter.hpp" 2 | 3 | namespace acid { 4 | ToneFilter::ToneFilter(const Pipeline::Stage &pipelineStage) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Tone.frag"}) { 6 | } 7 | 8 | void ToneFilter::Render(const CommandBuffer &commandBuffer) { 9 | // Updates descriptors. 10 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 11 | 12 | if (!descriptorSet.Update(pipeline)) 13 | return; 14 | 15 | // Draws the object. 16 | pipeline.BindPipeline(commandBuffer); 17 | 18 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 19 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Post/Filters/ToneFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT ToneFilter : public PostFilter { 7 | public: 8 | explicit ToneFilter(const Pipeline::Stage &pipelineStage); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Post/Filters/VignetteFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT VignetteFilter : public PostFilter { 7 | public: 8 | explicit VignetteFilter(const Pipeline::Stage &pipelineStage, float innerRadius = 0.15f, float outerRadius = 1.35f, float opacity = 0.85f); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | 12 | float GetInnerRadius() const { return innerRadius; } 13 | void SetInnerRadius(float innerRadius) { this->innerRadius = innerRadius; } 14 | 15 | float GetOuterRadius() const { return outerRadius; } 16 | void SetOuterRadius(float outerRadius) { this->outerRadius = outerRadius; } 17 | 18 | float GetOpacity() const { return opacity; } 19 | void SetOpacity(float opacity) { this->opacity = opacity; } 20 | 21 | private: 22 | PushHandler pushScene; 23 | 24 | float innerRadius, outerRadius; 25 | float opacity; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Post/Filters/WobbleFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "WobbleFilter.hpp" 2 | 3 | namespace acid { 4 | WobbleFilter::WobbleFilter(const Pipeline::Stage &pipelineStage, float wobbleSpeed) : 5 | PostFilter(pipelineStage, {"Shaders/Post/Default.vert", "Shaders/Post/Wobble.frag"}), 6 | wobbleSpeed(wobbleSpeed), 7 | wobbleAmount(0.0f) { 8 | } 9 | 10 | void WobbleFilter::Render(const CommandBuffer &commandBuffer) { 11 | wobbleAmount += wobbleSpeed * Engine::Get()->GetDeltaRender().AsSeconds(); 12 | 13 | // Updates uniforms. 14 | pushScene.Push("moveIt", wobbleAmount); 15 | 16 | // Updates descriptors. 17 | descriptorSet.Push("PushScene", pushScene); 18 | PushConditional("writeColour", "samplerColour", "resolved", "diffuse"); 19 | 20 | if (!descriptorSet.Update(pipeline)) 21 | return; 22 | 23 | // Draws the object. 24 | pipeline.BindPipeline(commandBuffer); 25 | 26 | descriptorSet.BindDescriptor(commandBuffer, pipeline); 27 | pushScene.BindPush(commandBuffer, pipeline); 28 | vkCmdDraw(commandBuffer, 3, 1, 0, 0); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Post/Filters/WobbleFilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Post/PostFilter.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT WobbleFilter : public PostFilter { 7 | public: 8 | explicit WobbleFilter(const Pipeline::Stage &pipelineStage, float wobbleSpeed = 2.0f); 9 | 10 | void Render(const CommandBuffer &commandBuffer) override; 11 | 12 | float GetWobbleSpeed() const { return wobbleSpeed; } 13 | void SetWobbleSpeed(float wobbleSpeed) { this->wobbleSpeed = wobbleSpeed; } 14 | 15 | private: 16 | PushHandler pushScene; 17 | 18 | float wobbleSpeed; 19 | float wobbleAmount; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Post/PostPipeline.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Subrender.hpp" 4 | 5 | namespace acid { 6 | /** 7 | * @brief Represents a system of post effects. 8 | */ 9 | class ACID_EXPORT PostPipeline : public Subrender { 10 | public: 11 | /** 12 | * Creates a new post pipeline. 13 | * @param pipelineStage The pipelines graphics stage. 14 | */ 15 | explicit PostPipeline(const Pipeline::Stage &pipelineStage) : 16 | Subrender(pipelineStage) { 17 | } 18 | 19 | virtual ~PostPipeline() = default; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Resources/Resource.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Utils/NonCopyable.hpp" 6 | #include "Export.hpp" 7 | 8 | namespace acid { 9 | /** 10 | * @brief A managed resource object. Implementations contain Create functions that can take a node object or pass parameters to the constructor. 11 | */ 12 | class ACID_EXPORT Resource : NonCopyable { 13 | public: 14 | Resource() = default; 15 | virtual ~Resource() = default; 16 | 17 | virtual std::type_index GetTypeIndex() const = 0; 18 | 19 | /*template 20 | friend auto operator>>(const Node &node, std::shared_ptr &object) -> std::enable_if_t, const Node &> { 21 | object = T::Create(node); 22 | return node; 23 | }*/ 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /Sources/Scenes/Scene.cpp: -------------------------------------------------------------------------------- 1 | #include "Scene.hpp" 2 | 3 | namespace acid { 4 | Scene::Scene(std::unique_ptr &&camera) : 5 | camera(std::move(camera)) { 6 | } 7 | 8 | void Scene::Update() { 9 | systems.ForEach([](auto typeId, auto system) { 10 | if (system->IsEnabled()) 11 | system->Update(); 12 | }); 13 | 14 | entities.Update(); 15 | camera->Update(); 16 | } 17 | 18 | void Scene::ClearSystems() { 19 | systems.Clear(); 20 | } 21 | 22 | Entity *Scene::GetEntity(const std::string &name) const { 23 | return entities.GetEntity(name); 24 | } 25 | 26 | Entity *Scene::CreateEntity() { 27 | return entities.CreateEntity(); 28 | } 29 | 30 | Entity *Scene::CreatePrefabEntity(const std::string &filename) { 31 | return entities.CreatePrefabEntity(filename); 32 | } 33 | 34 | std::vector Scene::QueryAllEntities() { 35 | return entities.QueryAll(); 36 | } 37 | 38 | void Scene::ClearEntities() { 39 | entities.Clear(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Sources/Scenes/Scenes.cpp: -------------------------------------------------------------------------------- 1 | #include "Scenes.hpp" 2 | 3 | namespace acid { 4 | Scenes::Scenes() { 5 | } 6 | 7 | void Scenes::Update() { 8 | if (!scene) return; 9 | 10 | if (!scene->started) { 11 | scene->Start(); 12 | scene->started = true; 13 | } 14 | 15 | scene->Update(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Sources/Scenes/Scenes.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Engine/Engine.hpp" 4 | #include "Graphics/Graphics.hpp" 5 | #include "Scene.hpp" 6 | 7 | namespace acid { 8 | /** 9 | * @brief Module used for managing game scenes. 10 | */ 11 | class ACID_EXPORT Scenes : public Module::Registrar { 12 | // TODO: Scenes should not require Graphics, this is because of Material and Mesh components. 13 | inline static const bool Registered = Register(Stage::Normal, Requires()); 14 | public: 15 | Scenes(); 16 | 17 | void Update() override; 18 | 19 | /** 20 | * Gets the current scene. 21 | * @return The current scene. 22 | */ 23 | Scene *GetScene() const { return scene.get(); } 24 | 25 | /** 26 | * Sets the current scene to a new scene. 27 | * @param scene The new scene. 28 | */ 29 | void SetScene(std::unique_ptr &&scene) { this->scene = std::move(scene); } 30 | 31 | private: 32 | std::unique_ptr scene; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /Sources/Scenes/System.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Utils/NonCopyable.hpp" 4 | #include "Utils/TypeInfo.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT System : NonCopyable { 8 | public: 9 | virtual ~System() = default; 10 | 11 | virtual void Update() = 0; 12 | 13 | bool IsEnabled() const { return enabled; } 14 | void SetEnabled(bool enable) { this->enabled = enable; } 15 | 16 | private: 17 | bool enabled = true; 18 | }; 19 | 20 | template class ACID_EXPORT TypeInfo; 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Scenes/SystemHolder.cpp: -------------------------------------------------------------------------------- 1 | #include "SystemHolder.hpp" 2 | 3 | namespace acid { 4 | void SystemHolder::Clear() { 5 | systems.clear(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sources/Shadows/ShadowRender.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Scenes/Component.hpp" 4 | #include "Graphics/Descriptors/DescriptorsHandler.hpp" 5 | #include "Graphics/Buffers/PushHandler.hpp" 6 | #include "Graphics/Pipelines/PipelineGraphics.hpp" 7 | 8 | namespace acid { 9 | /** 10 | * @brief Component that is used to render a entity as a shadow. 11 | */ 12 | class ACID_EXPORT ShadowRender : public Component::Registrar { 13 | inline static const bool Registered = Register("shadowRender"); 14 | public: 15 | ShadowRender(); 16 | 17 | void Start() override; 18 | void Update() override; 19 | 20 | bool CmdRender(const CommandBuffer &commandBuffer, const PipelineGraphics &pipeline); 21 | 22 | friend const Node &operator>>(const Node &node, ShadowRender &shadowRender); 23 | friend Node &operator<<(Node &node, const ShadowRender &shadowRender); 24 | 25 | private: 26 | DescriptorsHandler descriptorSet; 27 | PushHandler pushObject; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Shadows/Shadows.cpp: -------------------------------------------------------------------------------- 1 | #include "Shadows.hpp" 2 | 3 | #include "Scenes/Scenes.hpp" 4 | 5 | namespace acid { 6 | Shadows::Shadows() : 7 | lightDirection(0.5f, 0.0f, 0.5f), 8 | shadowSize(4096), 9 | shadowPcf(1), 10 | shadowBias(0.001f), 11 | shadowDarkness(0.6f), 12 | shadowTransition(11.0f), 13 | shadowBoxOffset(9.0f), 14 | shadowBoxDistance(70.0f) { 15 | } 16 | 17 | void Shadows::Update() { 18 | if (auto camera = Scenes::Get()->GetScene()->GetCamera()) 19 | shadowBox.Update(*camera, lightDirection, shadowBoxOffset, shadowBoxDistance); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Shadows/ShadowsSubrender.cpp: -------------------------------------------------------------------------------- 1 | #include "ShadowsSubrender.hpp" 2 | 3 | #include "Models/Vertex3d.hpp" 4 | #include "Scenes/Scenes.hpp" 5 | #include "ShadowRender.hpp" 6 | #include "Shadows.hpp" 7 | 8 | namespace acid { 9 | ShadowsSubrender::ShadowsSubrender(const Pipeline::Stage &pipelineStage) : 10 | Subrender(pipelineStage), 11 | pipeline(pipelineStage, {"Shaders/Shadows/Shadow.vert", "Shaders/Shadows/Shadow.frag"}, {Vertex3d::GetVertexInput()}, {}, 12 | PipelineGraphics::Mode::Polygon, PipelineGraphics::Depth::None, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_POLYGON_MODE_FILL, VK_CULL_MODE_FRONT_BIT) { 13 | } 14 | 15 | void ShadowsSubrender::Render(const CommandBuffer &commandBuffer) { 16 | auto camera = Scenes::Get()->GetScene()->GetCamera(); 17 | 18 | pipeline.BindPipeline(commandBuffer); 19 | 20 | auto sceneShadowRenders = Scenes::Get()->GetScene()->QueryComponents(); 21 | 22 | for (const auto &shadowRender : sceneShadowRenders) 23 | shadowRender->CmdRender(commandBuffer, pipeline); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sources/Shadows/ShadowsSubrender.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics/Subrender.hpp" 4 | #include "Graphics/Pipelines/PipelineGraphics.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT ShadowsSubrender : public Subrender { 8 | public: 9 | explicit ShadowsSubrender(const Pipeline::Stage &pipelineStage); 10 | 11 | void Render(const CommandBuffer &commandBuffer) override; 12 | 13 | private: 14 | PipelineGraphics pipeline; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /Sources/Uis/Constraints/UiAnchor.cpp: -------------------------------------------------------------------------------- 1 | #include "UiAnchor.hpp" 2 | 3 | namespace acid { 4 | const UiAnchor UiAnchor::Zero(0.0f); 5 | const UiAnchor UiAnchor::Left(0.0f); 6 | const UiAnchor UiAnchor::Top(0.0f); 7 | const UiAnchor UiAnchor::Centre(0.5f); 8 | const UiAnchor UiAnchor::Right(1.0f); 9 | const UiAnchor UiAnchor::Bottom(1.0f); 10 | } 11 | -------------------------------------------------------------------------------- /Sources/Uis/Constraints/UiAnchor.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Export.hpp" 4 | 5 | namespace acid { 6 | class ACID_EXPORT UiAnchor { 7 | public: 8 | explicit constexpr UiAnchor(float value) : value(value) {} 9 | 10 | constexpr float Get() const { return value; } 11 | 12 | bool operator==(const UiAnchor &rhs) const { 13 | return value == rhs.value; 14 | } 15 | 16 | bool operator!=(const UiAnchor &rhs) const { 17 | return !operator==(rhs); 18 | } 19 | 20 | static const UiAnchor Zero; 21 | static const UiAnchor Left; 22 | static const UiAnchor Top; 23 | static const UiAnchor Centre; 24 | static const UiAnchor Right; 25 | static const UiAnchor Bottom; 26 | 27 | private: 28 | float value; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Uis/Constraints/UiConstraint.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace acid { 6 | class UiConstraints; 7 | 8 | enum class UiConstraintType { 9 | X, Y, Width, Height 10 | }; 11 | 12 | template 13 | class UiConstraint { 14 | public: 15 | virtual ~UiConstraint() = default; 16 | 17 | bool Update(const UiConstraints *object, const UiConstraints *parent) { 18 | auto last = current; 19 | current = Calculate(object, parent) + offset; 20 | return current != last; 21 | } 22 | 23 | virtual int32_t Calculate(const UiConstraints *object, const UiConstraints *parent) const = 0; 24 | 25 | /** 26 | * Gets the constraints value. 27 | * @return The current value. 28 | */ 29 | virtual int32_t Get() const { return current; } 30 | 31 | int32_t GetOffset() const { return offset; } 32 | void SetOffset(int32_t offset) { this->offset = offset; } 33 | 34 | protected: 35 | /// The most recent value calculation. 36 | int32_t current = 0; 37 | /// Value offset in pixels. 38 | int32_t offset = 0; 39 | }; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Sources/Uis/Constraints/UiConstraints.cpp: -------------------------------------------------------------------------------- 1 | #include "UiConstraints.hpp" 2 | 3 | #include "PixelConstraint.hpp" 4 | #include "RelativeConstraint.hpp" 5 | 6 | namespace acid { 7 | UiConstraints::UiConstraints() { 8 | SetX(0); 9 | SetY(0); 10 | SetWidth(1.0f); 11 | SetHeight(1.0f); 12 | } 13 | 14 | bool UiConstraints::Update(const UiConstraints *parent) { 15 | bool dirty = false; 16 | dirty |= x->Update(this, parent); 17 | dirty |= y->Update(this, parent); 18 | dirty |= width->Update(this, parent); 19 | dirty |= height->Update(this, parent); 20 | return dirty; 21 | } 22 | } -------------------------------------------------------------------------------- /Sources/Uis/Drivers/ConstantDriver.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UiDriver.hpp" 4 | 5 | namespace acid { 6 | /** 7 | * @brief A driver that has a constant value. 8 | * @tparam T The type to be driven. 9 | */ 10 | 11 | template 12 | class ConstantDriver : public UiDriver { 13 | public: 14 | /** 15 | * Creates a new constant driver. 16 | * @param constant The constant value. 17 | */ 18 | explicit ConstantDriver(const T &constant) : 19 | UiDriver(-1s), 20 | constant(constant) { 21 | } 22 | 23 | /** 24 | * Gets the constant. 25 | * @return The constant. 26 | */ 27 | const T &GetConstant() const { return constant; } 28 | /** 29 | * Sets the constant. 30 | * @param constant The new constant. 31 | */ 32 | void SetConstant(const T &constant) { this->constant = constant; }; 33 | 34 | protected: 35 | T Calculate(float factor) override { 36 | return constant; 37 | } 38 | 39 | private: 40 | T constant; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /Sources/Uis/Inputs/UiBooleanInput.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Fonts/Text.hpp" 4 | #include "Guis/Gui.hpp" 5 | #include "Uis/UiObject.hpp" 6 | #include "UiButtonInput.hpp" 7 | 8 | namespace acid { 9 | class ACID_EXPORT UiBooleanInput : public UiObject { 10 | public: 11 | UiBooleanInput(); 12 | 13 | void UpdateObject() override; 14 | 15 | const std::string &GetTitle() const { return textTitle.GetString(); } 16 | void SetTitle(const std::string &string) { textTitle.SetString(string); } 17 | 18 | bool GetValue() const { return value; } 19 | void SetValue(bool value); 20 | 21 | /** 22 | * Called when this value of the input changes. 23 | * @return The delegate. 24 | */ 25 | rocket::signal &OnValue() { return onValue; } 26 | 27 | private: 28 | void UpdateValue(); 29 | 30 | Gui slider; 31 | Gui background; 32 | Text textTitle; 33 | Text textValue; 34 | 35 | bool value = false; 36 | 37 | rocket::signal onValue; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /Sources/Uis/Inputs/UiButtonInput.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Fonts/Text.hpp" 4 | #include "Guis/Gui.hpp" 5 | #include "Uis/UiObject.hpp" 6 | 7 | namespace acid { 8 | class ACID_EXPORT UiButtonInput : public UiObject { 9 | public: 10 | UiButtonInput(); 11 | 12 | void UpdateObject() override; 13 | 14 | const std::string &GetTitle() const { return title.GetString(); } 15 | void SetTitle(const std::string &string) { title.SetString(string); } 16 | 17 | constexpr static Vector2i Size = {175, 28}; 18 | constexpr static Vector2i Padding = {5, 5}; 19 | constexpr static float FontSize = 13.0f; 20 | constexpr static Time SlideTime = 0.07s; 21 | 22 | constexpr static Colour ValueColour = 0xFEFCFE; 23 | constexpr static Colour TitleColour = 0x9C9A9C; 24 | 25 | constexpr static Colour BackgroundColour = 0x282729; 26 | constexpr static Colour PrimaryColour = 0x121113; 27 | constexpr static Colour SelectedColour = 0xFEA62A; 28 | constexpr static Colour ButtonColour = 0x3C3B3C; 29 | 30 | private: 31 | Gui background; 32 | Text title; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /Sources/Uis/UiScrollBar.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Guis/Gui.hpp" 4 | #include "Uis/UiObject.hpp" 5 | 6 | namespace acid { 7 | enum class ScrollBar { 8 | None = 0, 9 | Vertical = 1, 10 | Horizontal = 2, 11 | Both = Vertical | Horizontal 12 | }; 13 | ENABLE_BITMASK_OPERATORS(ScrollBar) 14 | 15 | class ACID_EXPORT UiScrollBar : public UiObject { 16 | public: 17 | UiScrollBar(); 18 | 19 | void UpdateObject() override; 20 | 21 | float GetProgress(); 22 | void SetSize(const Vector2f &size); 23 | void SetType(ScrollBar type); 24 | 25 | constexpr static uint32_t Size = 8; 26 | 27 | private: 28 | float ScrollByDelta(float delta) const; 29 | 30 | float ScrollByPosition(float position) const; 31 | 32 | Gui background; 33 | Gui scroll; 34 | uint32_t index = 0; 35 | bool updating = false; 36 | bool mouseOver = false; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /Sources/Uis/UiSection.cpp: -------------------------------------------------------------------------------- 1 | #include "UiSection.hpp" 2 | 3 | #include "Uis/Uis.hpp" 4 | 5 | namespace acid { 6 | UiSection::UiSection() { 7 | icon.SetImage(Image2d::Create("Guis/Triangle_Down.png")); 8 | UiObject::AddChild(&icon); 9 | 10 | title.SetFontType(FontType::Create("Fonts/ProximaNova-Regular.ttf")); 11 | title.SetTextColour(Colour::White); 12 | UiObject::AddChild(&title); 13 | 14 | UiObject::AddChild(&content); 15 | 16 | OnClick().connect(this, [this](MouseButton button) { 17 | if (button == MouseButton::Left) { 18 | CancelEvent(MouseButton::Left); 19 | 20 | collapsed = !collapsed; 21 | 22 | if (collapsed) { 23 | icon.SetImage(Image2d::Create("Guis/Triangle_Right.png")); 24 | } else { 25 | icon.SetImage(Image2d::Create("Guis/Triangle_Down.png")); 26 | } 27 | 28 | onCollapsed(this, collapsed); 29 | } 30 | }); 31 | } 32 | 33 | void UiSection::UpdateObject() { 34 | content.SetEnabled(!collapsed); 35 | } 36 | 37 | void UiSection::AddChild(UiObject *child) { 38 | content.AddChild(child); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sources/Uis/UiSection.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Fonts/Text.hpp" 4 | #include "Guis/Gui.hpp" 5 | #include "Uis/UiObject.hpp" 6 | 7 | namespace acid { 8 | class ACID_EXPORT UiSection : public UiObject { 9 | public: 10 | UiSection(); 11 | 12 | void UpdateObject() override; 13 | 14 | void AddChild(UiObject *child) override; 15 | 16 | const std::string &GetTitle() const { return title.GetString(); } 17 | void SetTitle(const std::string &string) { title.SetString(string); } 18 | 19 | /** 20 | * Called when this section has been collapsed or uncollapsed. 21 | * @return The delegate. 22 | */ 23 | rocket::signal &OnCollapsed() { return onCollapsed; } 24 | 25 | private: 26 | Gui icon; 27 | Text title; 28 | UiObject content; 29 | 30 | bool collapsed = false; 31 | 32 | rocket::signal onCollapsed; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /Sources/Uis/UiStartLogo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Fonts/Text.hpp" 4 | #include "Guis/Gui.hpp" 5 | 6 | namespace acid { 7 | class ACID_EXPORT UiStartLogo : public UiObject { 8 | public: 9 | explicit UiStartLogo(); 10 | 11 | void UpdateObject() override; 12 | 13 | bool IsFinished() const { return finished; } 14 | rocket::signal &OnFinished() { return onFinished; } 15 | 16 | #ifdef ACID_DEBUG 17 | constexpr static Time StartDelay = 1s; 18 | #else 19 | constexpr static Time StartDelay = 3s; 20 | #endif 21 | 22 | private: 23 | Gui background; 24 | Gui logoAcid; 25 | Text textCopyright; 26 | 27 | bool finished = false; 28 | 29 | rocket::signal onFinished; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /Sources/Utils/Enumerate.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace acid { 7 | /** 8 | * http://reedbeta.com/blog/python-like-enumerate-in-cpp17/ 9 | */ 10 | template())), 12 | typename = decltype(std::end(std::declval()))> 13 | constexpr auto Enumerate(T &&iterable) { 14 | struct iterator { 15 | size_t i; 16 | TIter iter; 17 | bool operator!=(const iterator &rhs) const { return iter != rhs.iter; } 18 | void operator++() { ++i; ++iter; } 19 | auto operator*() const { return std::tie(i, *iter); } 20 | }; 21 | struct iterable_wrapper { 22 | T iterable; 23 | auto begin() { return iterator{0, std::begin(iterable)}; } 24 | auto end() { return iterator{0, std::end(iterable)}; } 25 | }; 26 | return iterable_wrapper{std::forward(iterable)}; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sources/Utils/NonCopyable.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Export.hpp" 4 | 5 | namespace acid { 6 | /** 7 | * @brief Class that removes the copy constructor and operator from derived classes, while leaving move. 8 | */ 9 | class ACID_EXPORT NonCopyable { 10 | protected: 11 | NonCopyable() = default; 12 | virtual ~NonCopyable() = default; 13 | 14 | public: 15 | NonCopyable(const NonCopyable &) = delete; 16 | NonCopyable(NonCopyable &&) noexcept = default; 17 | NonCopyable &operator=(const NonCopyable &) = delete; 18 | NonCopyable &operator=(NonCopyable &&) noexcept = default; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /Tests/Editor/Editor.rc: -------------------------------------------------------------------------------- 1 | IDR_MAINFRAME ICON 2 | "..\\..\\Resources\\Icons\\Icon.ico" -------------------------------------------------------------------------------- /Tests/Editor/EditorRenderer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using namespace acid; 6 | 7 | namespace test { 8 | class EditorRenderer : public Renderer { 9 | public: 10 | EditorRenderer(); 11 | 12 | void Start() override; 13 | void Update() override; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /Tests/Editor/Plugins.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "Uis/Panels.hpp" 8 | 9 | using namespace acid; 10 | 11 | struct cr_plugin; 12 | 13 | namespace test { 14 | /** 15 | * Module used for managing the world. 16 | */ 17 | class Plugins : public Module::Registrar, public rocket::trackable { 18 | inline static const bool Registered = Register(Stage::Always, Requires()); 19 | public: 20 | Plugins(); 21 | ~Plugins(); 22 | 23 | void Update() override; 24 | 25 | private: 26 | std::filesystem::path loadedPath; 27 | FileObserver fileObserver; 28 | std::unique_ptr plugin; 29 | bool update = true; 30 | 31 | //Panels panels; 32 | 33 | KeyboardInputButton buttonReload; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /Tests/Editor/Uis/Hierarchy.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | //#include 8 | #include 9 | #include 10 | #include 11 | 12 | using namespace acid; 13 | 14 | namespace test { 15 | class Hierarchy : public UiPanel { 16 | public: 17 | Hierarchy(); 18 | 19 | void UpdateObject() override; 20 | 21 | private: 22 | UiSection section1; 23 | UiButtonInput button1; 24 | 25 | UiSliderInput sliderR; 26 | UiSliderInput sliderG; 27 | UiSliderInput sliderB; 28 | UiTextInput textHex; 29 | Gui rgbColour; 30 | //UiColourWheel colourWheel; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /Tests/Editor/Uis/Inspector.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | //#include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | using namespace acid; 13 | 14 | namespace test { 15 | class Inspector : public UiPanel { 16 | public: 17 | Inspector(); 18 | 19 | void UpdateObject() override; 20 | 21 | private: 22 | UiSection section1; 23 | UiButtonInput button1; 24 | UiGrabberMouse input1; 25 | UiGrabberKeyboard input2; 26 | UiGrabberJoystick input3; 27 | UiSliderInput slider1; 28 | UiTextInput text1; 29 | //UiRadioInput radio1; 30 | //UiRadioInput radio2; 31 | //UiRadioInput radio3; 32 | //UiRadioManager radioManager1; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /Tests/Editor/Uis/Panels.cpp: -------------------------------------------------------------------------------- 1 | #include "Panels.hpp" 2 | 3 | namespace test { 4 | Panels::Panels() { 5 | //hierarchy.SetTransform({{400, 500}, UiAnchor::LeftTop}); 6 | AddChild(&hierarchy); 7 | 8 | //inspector.SetTransform({{1.0f, 0.0f}, UiAnchor::RightTop, {0.3f, 1.0f}}); 9 | AddChild(&inspector); 10 | } 11 | 12 | void Panels::UpdateObject() { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Tests/Editor/Uis/Panels.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Hierarchy.hpp" 4 | #include "Inspector.hpp" 5 | 6 | using namespace acid; 7 | 8 | namespace test { 9 | class Panels : public UiObject { 10 | public: 11 | Panels(); 12 | 13 | void UpdateObject() override; 14 | 15 | private: 16 | Hierarchy hierarchy; 17 | Inspector inspector; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /Tests/EditorTest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE EDITORTEST_HEADER_FILES 2 | RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} 3 | "*.h" "*.hpp" "*.inl" 4 | ) 5 | file(GLOB_RECURSE EDITORTEST_SOURCE_FILES 6 | RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} 7 | "*.c" "*.cpp" "*.rc" 8 | ) 9 | 10 | add_library(EditorTest ${EDITORTEST_HEADER_FILES} ${EDITORTEST_SOURCE_FILES}) 11 | 12 | target_compile_features(EditorTest PUBLIC cxx_std_17) 13 | target_compile_definitions(EditorTest 14 | PUBLIC 15 | ACID_RELOAD 16 | ) 17 | target_include_directories(EditorTest PRIVATE $) 18 | target_link_libraries(EditorTest PRIVATE Acid::Acid) 19 | 20 | set_target_properties(EditorTest PROPERTIES 21 | FOLDER "Acid/Editor" 22 | ) 23 | 24 | include(AcidGroupSources) 25 | acid_group_sources("${CMAKE_CURRENT_SOURCE_DIR}" "/" "" "${EDITORTEST_HEADER_FILES}") 26 | acid_group_sources("${CMAKE_CURRENT_SOURCE_DIR}" "/" "" "${EDITORTEST_SOURCE_FILES}") 27 | -------------------------------------------------------------------------------- /Tests/EditorTest/MainApp.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using namespace acid; 6 | 7 | namespace test { 8 | class MainApp : public App { 9 | public: 10 | MainApp(); 11 | ~MainApp(); 12 | 13 | void Start() override; 14 | void Update() override; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /Tests/EditorTest/MainRenderer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using namespace acid; 6 | 7 | namespace test { 8 | class MainRenderer : public Renderer { 9 | public: 10 | MainRenderer(); 11 | 12 | void Start() override; 13 | void Update() override; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /Tests/EditorTest/Scenes/FpsCamera.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using namespace acid; 6 | 7 | namespace test { 8 | class FpsCamera : public Camera { 9 | public: 10 | FpsCamera(); 11 | 12 | void Start() override; 13 | void Update() override; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /Tests/EditorTest/Scenes/FpsPlayer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using namespace acid; 6 | 7 | namespace test { 8 | class FpsPlayer : public Component::Registrar { 9 | inline static const bool Registered = Register("fpsPlayer"); 10 | public: 11 | FpsPlayer(); 12 | 13 | void Start() override; 14 | void Update() override; 15 | 16 | friend const Node &operator>>(const Node &node, FpsPlayer &player); 17 | friend Node &operator<<(Node &node, const FpsPlayer &player); 18 | 19 | private: 20 | bool noclipEnabled = false; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /Tests/EditorTest/Scenes/Scene1.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include